Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Incorrect syntax highlighting for backtick prop values in JSX expressions #661

Open
bluwy opened this issue Oct 3, 2023 · 1 comment · May be fixed by #828
Open

🐛 BUG: Incorrect syntax highlighting for backtick prop values in JSX expressions #661

bluwy opened this issue Oct 3, 2023 · 1 comment · May be fixed by #828
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: syntax Issue in our syntax highlighting (scope)

Comments

@bluwy
Copy link
Member

bluwy commented Oct 3, 2023

Describe the Bug

image

Backtick prop values isn't correctly highlighted if they're inside expression blocks { }. They work if outside of it.

Steps to Reproduce

  1. npm init astro using template basics
  2. Paste {import.meta.env.PROD && <div class=`${title} foo`></div>} inside Layout.astro
  3. Observe it isn't highlighted properly
@Princesseuh
Copy link
Member

I'll add it to the pile of "We don't control the syntax inside JSX expression and adding to it is challenging"

Thank you for creating this issue!

@Princesseuh Princesseuh added bug feat: syntax Issue in our syntax highlighting (scope) labels Oct 3, 2023
@Princesseuh Princesseuh added - P3: minor bug An edge case that only affects very specific usage (priority) and removed bug labels Nov 12, 2023
@Princesseuh Princesseuh linked a pull request Mar 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P3: minor bug An edge case that only affects very specific usage (priority) feat: syntax Issue in our syntax highlighting (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants