From c5600c9c0154df1ed20eb0eb16dfaa8c09447a2f Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Thu, 30 Jun 2022 17:46:34 -0500 Subject: markdown: limit raw block highlight to code fence content --- languages.toml | 2 +- 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 -- cgit v1.2.3-70-g09d2