withastro / compiler

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

🐛 BUG: HTML Lines being Truncated after 700 characters #278

Closed aFuzzyBear closed 2 years ago

aFuzzyBear commented 2 years ago

What version of @astrojs/compiler are you using?

v22.20

What package manager are you using?

yarn

What operating system are you using?

wsl2; ubuntu 20.04

Describe the Bug

This is a really weird edge case I have found, and I believe it has to do with the compiler doing something funny.

I have found that there seems to be a upper limit which is far lower than the actual theoretical limit placed by the language, on the total number of characters that are printed to a single line in the html source code.

I have found where it does truncate the string it does so in a manner that breaks the string itself, its very peculiar, for further information I append this small screenshot that demonstrates what It is I am seeing, alongside a reproduction.

If this could be resolved I would really appreciate it, since it seems to of inadvertently placed a character limit on how much scripting XElement can do, which borks the entire component after 700characters, unknown

Link to Minimal Reproducible Example

https://codesandbox.io/s/vigorous-platform-p2jtq?file=/src/components/ProblemChild.astro

natemoo-re commented 2 years ago

Quite confident that this will be closed by https://github.com/withastro/compiler/pull/291