
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.
18 lines
815 B
Scheme
18 lines
815 B
Scheme
; From nvim-treesitter/nvim-treesitter
|
|
|
|
(fenced_code_block
|
|
(info_string
|
|
(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)
|
|
(#set! injection.combined))
|
|
|
|
((pipe_table_cell) @injection.content (#set! injection.language "markdown.inline") (#set! injection.include-unnamed-children))
|
|
|
|
((minus_metadata) @injection.content (#set! injection.language "yaml") (#set! injection.include-unnamed-children))
|
|
((plus_metadata) @injection.content (#set! injection.language "toml") (#set! injection.include-unnamed-children))
|
|
|
|
((inline) @injection.content (#set! injection.language "markdown.inline") (#set! injection.include-unnamed-children))
|