Skip to content

Parsing Error Results in "Cannot read properties of undefined (reading 'Symbol(astro:slot-string)')" #914

@gvkhna

Description

@gvkhna

Astro Info

Using latest version on stackblitz

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

Following in an Astro component <div class="text-zinc-500 before:content-['\0022'] after:content-['\0022']">Hello</div>

Causes the following error: Cannot read properties of undefined (reading 'Symbol(astro:slot-string)')

Minimal Repro Linked

Simply changing the snippet to <div class={text-zinc-500 before:content-['\0022'] after:content-['\0022']}>Hello</div> makes the parser/linter correctly flag that the syntax needs to be updated to octal sequence format ('\x022'). Etc. Otherwise the astro:slot-string error is opaque and not descriptive of the actual issue.

What's the expected result?

It should correctly parse without bracket tilde syntax {``}, and show the error that the classname needs to be updated with octal sequence format.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-ashetc-21tni3?file=src%2Fcomponents%2FTest.astro

Participation

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

Metadata

Metadata

Assignees

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