tree-sitter / tree-sitter-html

HTML grammar for Tree-sitter
MIT License
136 stars 72 forks source link

syntax highlighting gets disabled for HTML inside `<pre><code>` #42

Closed ayushnix closed 1 year ago

ayushnix commented 2 years ago

If I have my cursor inside a code block <pre><code> ... </code></pre> with HTML, syntax highlighting for HTML gets disabled but gets enabled once I move my cursor away from this code block.

https://user-images.githubusercontent.com/79408161/174468088-82cf48e5-f6b1-4970-ab2b-85b30f31deec.mp4

ayushnix commented 2 years ago

On further testing, it looks like syntax highlighting inside the code block gets buggy on other operations as well. It gets activated for moment when switching between insert and normal modes.