compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Astro doesn't render content if there is escaped number in an attribute

Open Machy8 opened this issue 1 year ago • 2 comments

What version of astro are you using?

2.31

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

yarn / npm

What operating system are you using?

Linux / Stackblitz

What browser are you using?

Not caused by browser.

Describe the Bug

I have been debugging https://github.com/stylify/packages/issues/233 for Stylify submitted by @MilesPernicious and I got to the result that if there is any escaped number (letters seem to be ok) in an attribute, the rendering "hangs" and no output is shown.

<div class="\2">Doesn't render</q>
<div id="\3">Nope</q>

<div class="2">This does</div>
<div class="\\2">This does too</div>
<div class="\x">Letters are ok</div>

Link to Minimal Reproducible Example

https://stackblitz.com/edit/astro-yahlqw?file=src%2Fpages%2Findex.astro

Participation

  • [ ] I am willing to submit a pull request for this issue.

Machy8 avatar Apr 17 '23 21:04 Machy8

This should probably get escaped by the compiler.

Moving this to the compiler repo

MoustaphaDev avatar Apr 21 '23 16:04 MoustaphaDev

Related #914

MoustaphaDev avatar Dec 20 '23 12:12 MoustaphaDev