🐛 BUG: Multiline string attributes inside attribute with invalid TSX identifier cause compiler to generate invalid code #961
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: tsx
Related to the TSX output (scope)
What version of
@astrojs/compiler
are you using?2.5.2
What package manager are you using?
pnpm
What operating system are you using?
macOS
Describe the Bug
Title is a mouthful, TL;DR, the following valid HTML:
generates the following invalid TSX, due to the multiline attirbute:
Using a valid identifier however works (TSX doesn't allow
:
at the beginning of attributes)Link to Minimal Reproducible Example
https://live-astro-compiler.vercel.app/?editor-state=WzMxLDEzOSw4LDAsMTAwLDk5LDE5MSwxMDEsMiwzLDIwNSwxNDYsODEsMTA3LDE5NCw0OCwxNiwxOTksMTkxLDc0LDE1MSwxNTEsMTkwLDE2OCwyMzUsMTAsMTk0LDQwLDU4LDE2LDE5OSwxOTgsOTYsMTUsMTk1LDE4NiwyMDUsMTM1LDE5MCw5MiwxNDcsODMsMTM4LDEwNSw4Miw0NiwxNjksMTMwLDIyNiwxMTksMjIzLDE4MSwxMTcsODYsMjMwLDIzLDg4LDk0LDE0NiwyNTIsMjQzLDE4NywxMjcsNDYsMTUxLDU5LDEwLDg5LDE5LDE2MSwyNDEsMTE1LDkxLDg2LDEzMyw3MCwyNTAsNjYsMTE0LDEzMyw1MywzNCwxNywyNDEsMTA0LDYwLDEzOCwxOTcsNjQsNzIsMTcxLDE0NCwxODMsMTksODUsMjM2LDUwLDE5LDI0MCw3MiwxNjQsNiwyMzEsMTY2LDE1Myw1NiwxMTgsMjUxLDQ4LDIyMywxMiwxNSwxMzMsMTQ1LDE5NSwxMTMsMjAsODAsOTcsNTQsMTk1LDEzNSwxMTAsMTA2LDE4MSw1NiwxMzgsMiw1LDE4MCw3NywyNCwyMDIsNTMsMjAwLDIzNywxMjUsMTI0LDIyLDEyMiwyMzAsNDksMTM4LDE5NCwzNiwyNDAsMTQ0LDcsMjExLDEwNSwxNiw4NiwxMzIsMTg3LDIsMjQ3LDIyNSwxNjAsMTE5LDExMSwzLDIwNywyMD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