nvim-treesitter/queries/markdown/injections.scm
Andy Freeland 0d0949683d Support TOML metadata in Markdown injections
Hugo, Zola, and likely other static site generators use `+++` for TOML,
not YAML.
2022-07-25 21:28:40 +02:00

12 lines
346 B
Scheme

(fenced_code_block
(info_string
(language) @language)
(#not-match? @language "elm")
(code_fence_content) @content (#exclude_children! @content))
((html_block) @html)
((minus_metadata) @yaml (#offset! @yaml 1 0 -1 0))
((plus_metadata) @toml (#offset! @toml 1 0 -1 0))
((inline) @markdown_inline (#exclude_children! @markdown_inline))