Skip to content

Commit

Permalink
Add YAML/TOML frontmatter injections for markdown (#21503)
Browse files Browse the repository at this point in the history
Closes #7938. Adds front-matter injections for TOML/YAML in markdown. 
- See: https://github.com/tree-sitter-grammars/tree-sitter-markdown/blob/split_parser/tree-sitter-markdown/queries/injections.scm.

Co-authored-by: Peter Tripp <peter@zed.dev>
  • Loading branch information
uncenter and notpeter authored Dec 6, 2024
1 parent d6e11c5 commit feb2d85
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/languages/src/markdown/injections.scm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@

((html_block) @content
(#set! "language" "html"))

((minus_metadata) @content (#set! "language" "yaml"))

((plus_metadata) @content (#set! "language" "toml"))

0 comments on commit feb2d85

Please sign in to comment.