You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Adding a script tag kills syntax highlighting #242
When you add a script tag (with type, source, or no attributes at all), all syntax highlighting turns off for the current file. Removing the script tag adds it back in.
Steps to Reproduce
Open a new file
Set the syntax as HTML, either by saving the file as HTML or using the syntax selector
Expand the html snippet (this step may be optional, but it's an easy way to see the lack of highlighting)
Type <script></scrip
Type t
Expected behavior:
All syntax is highlighted
Actual behavior:
No syntax is highlighted (all becomes gray, syntax classes disappear from the spans)
Reproduces how often:
100% of the time
Versions
Additional Information
No errors in the console
Reacted by alex-kim-dev, Andrew Knackstedt, Thwarter, Santiago, Zach Thornton, Kenneth Ormandy and Caleb Evans
Activity
Thwarter commentedon Jul 27, 2020
Saving then reopening the file fixes the issue most of the time...
josemanuelguzman commentedon Jul 30, 2020
I have the same issue...
elbowdonkey commentedon Sep 17, 2020
Seeing the same issue.
After turning off Tree Sitter in Settings > Core > Use Tree Sitter Parsers color highlighting works for HTML.
Leaving the Tree Sitter Parser setting on, but switching to an HTML grammar that doesn't use Tree Sitter also fixes the issue.
So, it's the Tree Sitter parser.
jmanuel1 commentedon Jul 9, 2021
I had this bug months ago, but I was not able to reproduce it today (July 8, 2021), even in safe mode.