compiler icon indicating copy to clipboard operation
compiler copied to clipboard

🐛 BUG: Parse Error With attributes

Open Fredkiss3 opened this issue 3 years ago • 1 comments

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&#8230;

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.

Fredkiss3 avatar Jul 08 '22 22:07 Fredkiss3

Transferring this to the compiler repo

natemoo-re avatar Jul 14 '22 16:07 natemoo-re

Seems to be fixed on the latest version thanks

Fredkiss3 avatar Nov 09 '22 15:11 Fredkiss3