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

VSCode: JSX {} dynamic operator isn't higlighted #7

Closed
RafidMuhymin opened this issue Aug 20, 2021 · 4 comments · Fixed by #286
Closed

VSCode: JSX {} dynamic operator isn't higlighted #7

RafidMuhymin opened this issue Aug 20, 2021 · 4 comments · Fixed by #286
Assignees
Labels
feat: syntax Issue in our syntax highlighting (scope)

Comments

@RafidMuhymin
Copy link
Member

What package manager are you using?

yarn

What operating system are you using?

Windows

Describe the Bug

The JSX {} dynamic operator isn't higlighted

Steps to Reproduce

The JSX {} dynamic operator should be higlighted

Link to Minimal Reproducible Example (Optional)

No response

@matthewp matthewp transferred this issue from withastro/astro Aug 25, 2021
@matthewp
Copy link
Collaborator

matthewp commented Sep 9, 2021

@RafidMuhymin can you provide an example of how this is highlighted in JSX but is not being highlighted in Astro? In my theme there is no special color provided to either of these. If there's a theme you use where that's not the case please let me know so I can check it out.

@RafidMuhymin
Copy link
Member Author

@matthewp Astro:
image

JSX:
image

@RafidMuhymin
Copy link
Member Author

Minimal repro:

---
// Please view the code in VSCode. Highlighting in GitHub is different from VSCode
---

<!DOCTYPE html>
<html>
  <body>
    <!-- The JSX {} operator isn't highlighted property in the following lines -->
    <h1>Hello {src}!</h1>
    <img {src} />

    <!-- The inner JSX {} operator in the following line is highlighted properly -->
    {(<img src={src} />)}
  </body>
</html>

@Princesseuh
Copy link
Member

This was fixed, however something to note is that you very rarely see native highlighting for brackets these days due to VS Code's bracket colorization. So to see the updated colors, you'd have to disable that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: syntax Issue in our syntax highlighting (scope)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants