withastro / compiler

The Astro compiler. Written in Go. Distributed as WASM.
Other
502 stars 59 forks source link

🐛 BUG: [TSX] Unclosed components after a closed component are treated as comments #987

Closed Princesseuh closed 8 months ago

Princesseuh commented 8 months ago

What version of @astrojs/compiler are you using?

^2.7.0

What package manager are you using?

pnpm

What operating system are you using?

macOS

Describe the Bug

---
---

<Component1></Component1>
<Component2

becomes

/* @jsxImportSource astro */

<Fragment>
<Component1></Component1>{`
<Component2`}
</Fragment>
export default function Card__AstroComponent_(_props: Record<string, any>): any {}

Since <Component2> is in a comment, completions don't work.

Link to Minimal Reproducible Example

https://live-astro-compiler.vercel.app/?editor-state=WzMxLDEzOSw4LDAsMTk2LDkyLDI1MiwxMDEsMiwzLDEwMSwxNDQsNzksNzksMTk1LDQ4LDEyLDE5NywxOTEsNzUsMjA2LDEwNywxMjksOTMsMTQ0LDE2Niw5LDEwNSwyNiwxMjcsMTMyLDE5NiwxLDE4MSw1LDExOCwyMTYsMTk3LDc1LDkyLDIwLDQxLDEzNywzNSwzOSwxMDEsOCwxOTYsMTE5LDE5OSwyMzcsMjE2LDg2LDE4Miw3NSwxNjQsMjE2LDE5MSwyNDcsMTU4LDIzNywxMTEsMTY1LDU5LDEwMiwxMiwxMjEsNzMsNjIsOTAsMTM1LDI1MiwxMzgsMTU2LDQ0LDUsNTMsODMsMjExLDI0MiwxODYsMTg4LDg0LDE5LDE2NSwyMDEsMTYwLDEyNCwxMzksMTYyLDg4LDEzNSwyMjUsODksMTM1LDEyMSw3OSw4MywxNiwyMTcsMjEzLDIwNSwyNTIsOTgsMjQ0LDI1LDE4MywxNjYsMTYyLDIyMSwxOCwxNTUsNTUsMTM0LDI0LDIwOSwxNjgsODksMTEsNDYsMjI1LDY4LDI0OSwxNTcsOTUsODMsMTc1LDQsMTM2LDE5Miw5LDE1OSw0MSwyMTcsNjAsMTMyLDI1NCwzMywxNTMsMzMsMTY0LDE1MCwyMTYsNjMsMTM0LDE0MCwyOCwxOTIsMTg5LDg0LDc5LDM0LDE3LDE5MCwxNDksMjUsMywyNDgsMjIyLDk2LDksMTA4LDc0LDcyLDE1Myw3MywyMzQsNjUsOTYsMTEyLDI0NiwxMSwyMDUsMjUzLDE0NSwxNDQsMjUwLDE5MywxNjksMTY2LDE0Miw1MywxMjIsMTM2LDIzMSwzMywxMzksMjIyLDIyNywxOTMsMjA5LDYsMjIwLDEzMCwyMjMsMjExLDEzNywxNzYsMjIzLDcsMTE2LDYyLDE1MSw4NSwxNTIsNTgsMTUxLDEwNyw3NywxNzgsOTIsMjM3LDIzMiw3MiwxMjQsODgsMjIwLDIyMiw5OCw2LDI1LDE5NiwyMzYsMzIsMjQxLDIwNCwyMjAsNzMsNDMsMTYxLDY3LDE1NywyMDksNTIsMTIzLDE0Nyw2LDU0LDE0Niw1NSwxNTYsMTIwLDIxMiwxNzMsODcsMjU1LDIzNCwxMzUsMjAwLDE4NywyMDcsMTM2LDEwOCwxODksMjgsMjMsOTIsMTMzLDE5MywzMiwyMTUsMTU0LDEwOSwyMjAsNzEsMjU1LDI1MiwyLDU4LDIyOSwxODAsMTAxLDIwNiwxLDAsMF0%3D

Princesseuh commented 8 months ago

I'm dumb, this is a duplicate of https://github.com/withastro/compiler/issues/862 🤦‍♀️