Skip to content

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

@Machy8

Description

@Machy8

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 stylify/packages#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    - P3: minor bugAn edge case that only affects very specific usage (priority)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions