diff options
author | Michael Davis | 2022-06-30 22:46:34 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2022-07-01 09:04:23 +0000 |
commit | c5600c9c0154df1ed20eb0eb16dfaa8c09447a2f (patch) | |
tree | add05cb8e2e5e616b2f4d72b698fc1815e2def7b | |
parent | c8dba2f4c699b50384802a0fb4e0dadf87ea1677 (diff) |
markdown: limit raw block highlight to code fence content
-rw-r--r-- | languages.toml | 2 | ||||
-rw-r--r-- | runtime/queries/markdown/highlights.scm | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/languages.toml b/languages.toml index 122cadfe..0b4a1dec 100644 --- a/languages.toml +++ b/languages.toml @@ -855,7 +855,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "markdown" -source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "ad8c32917a16dfbb387d1da567bf0c3fb6fffde2" } +source = { git = "https://github.com/MDeiml/tree-sitter-markdown", rev = "ab15701d8f3f68aeb74e30573b7d669a6ef2a7ed" } [[language]] name = "dart" diff --git a/runtime/queries/markdown/highlights.scm b/runtime/queries/markdown/highlights.scm index aee568c8..096c2954 100644 --- a/runtime/queries/markdown/highlights.scm +++ b/runtime/queries/markdown/highlights.scm @@ -8,11 +8,9 @@ (atx_heading (atx_h5_marker) @markup.heading.marker (heading_content) @markup.heading.5) (atx_heading (atx_h6_marker) @markup.heading.marker (heading_content) @markup.heading.6) -(code_fence_content) @none - [ (indented_code_block) - (fenced_code_block) + (code_fence_content) ] @markup.raw.block (block_quote) @markup.quote @@ -26,6 +24,8 @@ (link_destination) @markup.link.url (link_label) @markup.link.label +(info_string) @label + [ (link_text) (image_description) @@ -51,3 +51,4 @@ (inline_link ["[" "]" "(" ")"] @punctuation.bracket) (image ["[" "]" "(" ")"] @punctuation.bracket) +(fenced_code_block_delimiter) @punctuation.bracket |