Open Uxspy opened 4 months ago
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:
\r\n
<code></code>
...<pre data-language="javascript" id="PZrJj" class="ne-codeblock language-javascript"><code>const foo = 'foo' function bar() { const b = 'b' return b } </code></pre>...
👆🏻
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
...
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
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
No response
Please provide a minimal reproducible example. That code is working fine - https://stackblitz.com/edit/vite-dejjqk?file=docs%2Findex.md
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"
Everything works well after I removed all the line-breaks(
\r\n
) inside the<code></code>
tag, like this:Reproduction
👆🏻
Expected behavior
Expect works when using