question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiline vue-components transform error

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
xxholly32commented, Oct 10, 2020

this p tag is not in my code, it add by markdown-it. see my demo

0reactions
xxholly32commented, Oct 12, 2020

yeah , i got it.as your said It’s not a problem, it’s just that I don’t understand Markdown very well. need use more space-line for markdown

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rendering newline character in VueJS - Stack Overflow
I'm creating a note app where users can add a note by entering multiline text in a textarea. When ...
Read more >
vue/no-setup-props-destructure
Rule Details #. This rule reports the destructuring of props passed to setup causing the value to lose reactivity.
Read more >
How to Create Multi-Line String with Template Literals in ...
So template literals will output as it appears, spaces and all! Because of that, be mindful of your blank spaces or lines. const...
Read more >
How to Create Multi-Line String with Template Literals
It's super easy now to create multi-line strings with Template Literals in JavaScript. No more messy string line breaks. Yay, ES6!
Read more >
Form Textarea | Components - BootstrapVue
Create multi-line text inputs with support for auto height sizing, ... mounted) into the document or re-activated when inside a Vue <keep-alive> component....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found