Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[plugin:vite:vue] Element is missing end tag #4031

Closed
4 tasks done
Uxspy opened this issue Jul 9, 2024 · 3 comments
Closed
4 tasks done

[plugin:vite:vue] Element is missing end tag #4031

Uxspy opened this issue Jul 9, 2024 · 3 comments
Labels
need more info Further information is requested stale

Comments

@Uxspy
Copy link

Uxspy commented Jul 9, 2024

Describe the bug

I'm using html in .md files, if the html content is similar like the following, vitepress(run dev or run build) report "Element is missing end tag"

... <pre data-language="javascript" id="PZrJj" class="ne-codeblock language-javascript"><code>const foo = 'foo'

function bar() {
  const b = 'b'
  return b
}

</code></pre> ...

Everything works well after I removed all the line-breaks(\r\n) inside the <code></code> tag, like this:

...<pre data-language="javascript" id="PZrJj" class="ne-codeblock language-javascript"><code>const foo = 'foo'
function bar() {
  const b = 'b'
  return b
}
</code></pre>...

Reproduction

👆🏻

Expected behavior

Expect works when using

...
 in .md files with line-breaks

System Info

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M1
  Memory: 91.86 MB / 16.00 GB
  Shell: 5.9 - /bin/zsh
Binaries:
  Node: 14.21.3 - ~/.nvm/versions/node/v14.21.3/bin/node
  Yarn: 1.22.19 - ~/.nvm/versions/node/v14.21.3/bin/yarn
  npm: 6.14.18 - ~/.nvm/versions/node/v14.21.3/bin/npm
Browsers:
  Chrome: 126.0.6478.127
  Edge: 126.0.2592.87
  Safari: 17.5

Additional context

No response

Validations

@Uxspy Uxspy added the bug: pending triage Maybe a bug, waiting for confirmation label Jul 9, 2024
@brc-dd
Copy link
Member

brc-dd commented Jul 9, 2024

Please provide a minimal reproducible example. That code is working fine - https://stackblitz.com/edit/vite-dejjqk?file=docs%2Findex.md

@brc-dd brc-dd added need more info Further information is requested and removed bug: pending triage Maybe a bug, waiting for confirmation labels Jul 9, 2024
@github-actions github-actions bot added the stale label Sep 1, 2024
@pk5ls20
Copy link

pk5ls20 commented Dec 30, 2024

Please provide a minimal reproducible example. That code is working fine - stackblitz.com/edit/vite-dejjqk?file=docs%2Findex.md

https://stackblitz.com/edit/vite-t3cvwmct?file=docs%2Findex.md can reproduce this issue

In short, it's the presence of unclosed html tags in the MarkDown file that is causing this error

@brc-dd
Copy link
Member

brc-dd commented Dec 30, 2024

In short, it's the presence of unclosed html tags in the MarkDown file that is causing this error

That's not the author's original problem. And if you're writing invalid html it will obviously throw. Also, non-vue script tags are not supported inside markdown.

Closing the issue as stale. The author hasn't replied in 5 months.

@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Dec 30, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need more info Further information is requested stale
Projects
None yet
Development

No branches or pull requests

3 participants