From 49e067874133e12d10ad3ac0c941438e2d7025e7 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Wed, 15 Dec 2021 00:45:38 +0900 Subject: Add markdown grammar Fixes #215 --- runtime/queries/markdown/injections.scm | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 runtime/queries/markdown/injections.scm (limited to 'runtime/queries/markdown/injections.scm') diff --git a/runtime/queries/markdown/injections.scm b/runtime/queries/markdown/injections.scm new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3-70-g09d2 From ac4b72fcc88b1930b974196c75fde7d55e21d71f Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Wed, 15 Dec 2021 18:03:02 +0900 Subject: Add injections query for markdown --- runtime/queries/markdown/injections.scm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'runtime/queries/markdown/injections.scm') diff --git a/runtime/queries/markdown/injections.scm b/runtime/queries/markdown/injections.scm index e69de29b..ff3c5fe6 100644 --- a/runtime/queries/markdown/injections.scm +++ b/runtime/queries/markdown/injections.scm @@ -0,0 +1,8 @@ +(fenced_code_block + (info_string) @injection.language + (code_fence_content) @injection.content) + +((html_block) @injection.content + (#set! injection.language "html")) +((html_tag) @injection.content + (#set! injection.language "html")) -- cgit v1.2.3-70-g09d2 From 0dab6c8c17c027092e117a48f60feb099cd8d59c Mon Sep 17 00:00:00 2001 From: Flakebi Date: Wed, 29 Dec 2021 17:26:28 +0100 Subject: Fix markdown code-block highlighting Markdown code blocks should be highlighted as a single block, so set injection.include-children. --- runtime/queries/markdown/injections.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'runtime/queries/markdown/injections.scm') diff --git a/runtime/queries/markdown/injections.scm b/runtime/queries/markdown/injections.scm index ff3c5fe6..10dcab0b 100644 --- a/runtime/queries/markdown/injections.scm +++ b/runtime/queries/markdown/injections.scm @@ -1,6 +1,7 @@ (fenced_code_block (info_string) @injection.language - (code_fence_content) @injection.content) + (code_fence_content) @injection.content + (#set! injection.include-children)) ((html_block) @injection.content (#set! injection.language "html")) -- cgit v1.2.3-70-g09d2