Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Adding a script tag kills syntax highlighting #242

Open
1 task done
calebmeyer opened this issue Jun 22, 2020 · 4 comments
Open
1 task done

Adding a script tag kills syntax highlighting #242

calebmeyer opened this issue Jun 22, 2020 · 4 comments
Labels

Comments

@calebmeyer
Copy link

Prerequisites

Description

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

  1. Open a new file
  2. Set the syntax as HTML, either by saving the file as HTML or using the syntax selector
  3. Expand the html snippet (this step may be optional, but it's an easy way to see the lack of highlighting)
  4. Type <script></scrip
  5. Type t

test

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

image

image

Additional Information

No errors in the console
image

@Thwarter
Copy link

Thwarter commented Jul 27, 2020

Saving then reopening the file fixes the issue most of the time...

@josemanuelguzman
Copy link

I have the same issue...

@elbowdonkey
Copy link

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
Copy link

jmanuel1 commented 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants