aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Davis2022-12-23 01:21:02 +0000
committerGitHub2022-12-23 01:21:02 +0000
commit7905086b55eac2a817c16fe3a9ab987e718324c8 (patch)
treeacd420eab875a92cfa3ae9b0606a0b0d965bcb92
parentc4263d6a56c6490b34a43c7d393fce321514b6ef (diff)
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.
-rw-r--r--runtime/queries/markdown/injections.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/queries/markdown/injections.scm b/runtime/queries/markdown/injections.scm
index e184db15..e8839351 100644
--- a/runtime/queries/markdown/injections.scm
+++ b/runtime/queries/markdown/injections.scm
@@ -5,7 +5,10 @@
(language) @injection.language)
(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))