🐛 BUG: <html>
tag is removed when there are element elements or components before it
#913
Labels
- P2: has workaround
Bug, but has workaround (priority)
What version of
@astrojs/compiler
are you using?2.3.4
What package manager are you using?
pnpm
What operating system are you using?
Linux
Describe the Bug
When using any element or component before the html tag (or body tag), the html and body tags are removed from the output
Source
Current result
Expected result
This is how other HTML5 compliant parsers like
parse5
handle the source code.In the stackblitz repro you will see that the elements are somewhat rearranged, but that's the browser's work. See a direct visualization of the issue here
A workaround would be to simply NOT do that 😅
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-sb9voo?file=src%2Fpages%2Findex.astro
The text was updated successfully, but these errors were encountered: