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

Syntax highlighting doesn't work with "text/jsx" script tags #150171

Closed
GusGusGusGus opened this issue May 23, 2022 · 4 comments
Closed

Syntax highlighting doesn't work with "text/jsx" script tags #150171

GusGusGusGus opened this issue May 23, 2022 · 4 comments
Assignees

Comments

@GusGusGusGus
Copy link

GusGusGusGus commented May 23, 2022

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.67.2
  • OS Version: Windows 10 Home v. 10.0.19044 N/A Build 19044

Steps to Reproduce:

  1. Create a <script type="text/jsx"> tag in a .html file.
  2. Observe that syntax highlighting doesn't work inside the tag as long as script type is set to text/jsx. If it is changed to text/javascript then syntax highlighting works.
@GusGusGusGus
Copy link
Author

Adding to this, I've tried writting JS on an html file and it's not recognized as such (has no highlighting)
no js highlight

@aeschli
Copy link
Contributor

aeschli commented May 23, 2022

That doesn't look like HTML. Maybe JavaScript React?

@GusGusGusGus
Copy link
Author

GusGusGusGus commented May 23, 2022

Hi @aeschli , as I mentioned above, this was originally present inside a <script type="text/jsx"> tag. The image serves the same purpose of illustrating that strictly only HMTL is being recognized and no Javascript highlighting occurs. Similarly to inside the script tag, if I change the extension to .js , highlighting works. Why is there no highlighting of Javascript (even within an HTML)?

@aeschli
Copy link
Contributor

aeschli commented May 24, 2022

The html grammar needs to add support for type="text/jsx". https://github.com/textmate/html.tmbundle

There's already an issue: textmate/html.tmbundle#119

Closing as duplicate.

@aeschli aeschli closed this as completed May 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 8, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants