Skip to content

Multiline vue-components transform error  #95

Closed
@xxholly32

Description

@xxholly32

Describe the bug

index.md with

<foo-bar>
xxx
</foo-bar>

will throw error

[vite] SFC template compilation error: 
docs/index.md:4:1
Element is missing end tag.
1  |  
2  |  <template><div><h1 id="test"><a class="header-anchor" href="#test" aria-hidden="true">#</a> test</h1>
3  |  <foo-bar>
   |            ^
4  |  <p>xxx
5  |  </foo-bar></p>

docs/index.md:5:11
Invalid end tag.
3  |  <foo-bar>
4  |  <p>xxx
5  |  </foo-bar></p>
   |            ^
6  |  </div></template>

To Reproduce
Steps to reproduce the behavior:

clone my repo

run npm i && npm run docs

Expected behavior
A clear and concise description of what you expected to happen.

no error or warning and transform will be correct

System Info

  • vitepress version:0.6.0
  • vite version:1.0.0-rc.3
  • Node version:v12.16
  • OS version:10.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions