mirror of https://github.com/helix-editor/helix
Fix HTML injection within markdown (#5265)
HTML nodes should be combined injections in the markdown block grammar. When nodes are together the highlighting works properly but when there is markdown content between HTML nodes like in a `<details>` tag, the highlighting of the closing tag breaks since tree-sitter-html looks for opening and closing tags.pull/5266/head
parent
c4263d6a56
commit
7905086b55
|
@ -5,7 +5,10 @@
|
||||||
(language) @injection.language)
|
(language) @injection.language)
|
||||||
(code_fence_content) @injection.content (#set! injection.include-unnamed-children))
|
(code_fence_content) @injection.content (#set! injection.include-unnamed-children))
|
||||||
|
|
||||||
((html_block) @injection.content (#set! injection.language "html") (#set! injection.include-unnamed-children))
|
((html_block) @injection.content
|
||||||
|
(#set! injection.language "html")
|
||||||
|
(#set! injection.include-unnamed-children)
|
||||||
|
(#set! injection.combined))
|
||||||
|
|
||||||
((pipe_table_cell) @injection.content (#set! injection.language "markdown.inline") (#set! injection.include-unnamed-children))
|
((pipe_table_cell) @injection.content (#set! injection.language "markdown.inline") (#set! injection.include-unnamed-children))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue