compiler
compiler copied to clipboard
🐛 BUG: Parse Error With attributes
What version of astro are you using?
1.0.0-beta.64
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
pnpm
What operating system are you using?
Mac OS, Ventura 13.0, M1 chip
Describe the Bug
There is a bug with Astro with attributes parsing, when you use a single quote (') within an string attribute with backticks, it does not works and gives a 500 error
<h1 class="d'">Works</h1>
<h1 class={`d'`}>Does not work. </h1>
The Stacktrace :
Transform failed with 1 error:
/home/projects/github-g7vlyr/src/pages/bug.astro:30:26: ERROR: Expected ")" but found "}"
Error: Transform failed with 1 error:
/home/projects/github-g7vlyr/src/pages/bug.astro:30:26: ERROR: Expected ")" but found "}"
at failureErrorWithLog (/home/projects/github-g7vlyr/node_modules/esbuild/lib/main.js:1605:15)
at eval (/home/projects/github-g7vlyr/node_modules/esbuild/lib/main.js:1394:29)
at eval (/home/projects/github-g7vlyr/node_modules/esbuild/lib/main.js:666:9)
at handleIncomingPacket (/home/projects/github-g7vlyr/node_modules/esbuild/lib/main.js:763:9)
at So…
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-g7vlyr?file=src%2Fpages%2Findex.astro&on=stackblitz
Participation
- [ ] I am willing to submit a pull request for this issue.
Transferring this to the compiler repo
Seems to be fixed on the latest version thanks