From 29d22da5a33d0eeec6e2b49f8b8f903f29a30e5b Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 26 Jun 2026 22:13:52 +0200 Subject: [PATCH] feature: add highlighting for snippets in fenced code Signed-off-by: squidfunk --- .../src/python-markdown.tmLanguage.yml | 3 + .../snapshots/preprocess/snippet.scopes.json | 93 ++++++ .../python-markdown/test/specs/.editorconfig | 29 ++ .../test/specs/preprocess/snippet.md | 11 + .../syntaxes/python-markdown.tmLanguage.json | 295 +++++++++++++++++- 5 files changed, 430 insertions(+), 1 deletion(-) create mode 100644 grammars/textmate/python-markdown/test/specs/.editorconfig diff --git a/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml b/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml index 6fb9702..ed756ad 100644 --- a/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml +++ b/grammars/textmate/python-markdown/src/python-markdown.tmLanguage.yml @@ -461,6 +461,7 @@ repository: # while: (?:^|\G)(?![ \t]*(`{3,}|~{3,})[ \t]*$) # contentName: meta.embedded.block.{{language}} # patterns: + # - include: "#snippet" # - include: {{scope}} # @end @@ -504,6 +505,8 @@ repository: - begin: (?:^|\G) while: (?:^|\G)(?![ \t]*(`{3,}|~{3,})[ \t]*$) contentName: markup.raw.block.markdown + patterns: + - include: "#snippet" heading_atx: patterns: diff --git a/grammars/textmate/python-markdown/test/snapshots/preprocess/snippet.scopes.json b/grammars/textmate/python-markdown/test/snapshots/preprocess/snippet.scopes.json index da2ae2b..b0ea9ae 100644 --- a/grammars/textmate/python-markdown/test/snapshots/preprocess/snippet.scopes.json +++ b/grammars/textmate/python-markdown/test/snapshots/preprocess/snippet.scopes.json @@ -469,6 +469,10 @@ } ] }, + { + "line": "", + "tokens": [] + }, { "line": "index.md", "tokens": [ @@ -1077,5 +1081,94 @@ "tokens": [] } ] + }, + "fenced": { + "accept_inline_in_language_block": [ + { + "line": "```", + "tokens": [ + { + "text": "```", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "punctuation.definition.markdown" + ] + } + ] + }, + { + "line": "--8<-- \"../includes/intro.md\"", + "tokens": [ + { + "text": "--8<--", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "markup.raw.block.markdown", + "meta.snippet.inline.markdown", + "keyword.control.snippet.markdown" + ] + }, + { + "text": " ", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "markup.raw.block.markdown", + "meta.snippet.inline.markdown", + "comment.snippet.separator.markdown" + ] + }, + { + "text": "\"", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "markup.raw.block.markdown", + "meta.snippet.inline.markdown", + "punctuation.definition.string.begin.markdown" + ] + }, + { + "text": "../includes/intro.md", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "markup.raw.block.markdown", + "meta.snippet.inline.markdown", + "string.quoted.double.snippet.markdown" + ] + }, + { + "text": "\"", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "markup.raw.block.markdown", + "meta.snippet.inline.markdown", + "punctuation.definition.string.end.markdown" + ] + } + ] + }, + { + "line": "```", + "tokens": [ + { + "text": "```", + "scopes": [ + "text.html.markdown.python", + "markup.fenced_code.block.markdown", + "punctuation.definition.markdown" + ] + } + ] + }, + { + "line": "", + "tokens": [] + } + ] } } diff --git a/grammars/textmate/python-markdown/test/specs/.editorconfig b/grammars/textmate/python-markdown/test/specs/.editorconfig new file mode 100644 index 0000000..88f845f --- /dev/null +++ b/grammars/textmate/python-markdown/test/specs/.editorconfig @@ -0,0 +1,29 @@ +# Copyright (c) 2026 Zensical and contributors + +# SPDX-License-Identifier: MIT +# All contributions are certified under the DCO + +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: + +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. + +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +# IN THE SOFTWARE. + +# Top-level config +root = true + +# Python Markdown test specs +[*.md] +trim_trailing_whitespace = false diff --git a/grammars/textmate/python-markdown/test/specs/preprocess/snippet.md b/grammars/textmate/python-markdown/test/specs/preprocess/snippet.md index 07c5c92..cb6e281 100644 --- a/grammars/textmate/python-markdown/test/specs/preprocess/snippet.md +++ b/grammars/textmate/python-markdown/test/specs/preprocess/snippet.md @@ -65,6 +65,7 @@ about.md --8<-- + index.md --8<-- ``` @@ -129,3 +130,13 @@ index.md ``` md ``` + +## fenced + +### accept_inline_in_language_block + +```` md +``` +--8<-- "../includes/intro.md" +``` +```` diff --git a/integrations/code/syntaxes/python-markdown.tmLanguage.json b/integrations/code/syntaxes/python-markdown.tmLanguage.json index d01d6ab..8467ee0 100644 --- a/integrations/code/syntaxes/python-markdown.tmLanguage.json +++ b/integrations/code/syntaxes/python-markdown.tmLanguage.json @@ -1296,6 +1296,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.abap", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.abap" } @@ -1341,6 +1344,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.apache", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.apacheconf" } @@ -1386,6 +1392,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.applescript", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.applescript" } @@ -1431,6 +1440,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.arduino", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.arduino" } @@ -1476,6 +1488,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.awk", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.awk" } @@ -1521,6 +1536,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.bat", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.batchfile" } @@ -1566,6 +1584,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.bibtex", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.bibtex" } @@ -1611,6 +1632,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.c", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.c" } @@ -1656,6 +1680,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.clojure", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.clojure" } @@ -1701,6 +1728,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.cmake", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.cmake" } @@ -1746,6 +1776,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.cobol", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.cobol" } @@ -1791,6 +1824,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.coffeescript", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.coffee" } @@ -1836,6 +1872,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.cpp", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.cpp" } @@ -1881,6 +1920,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.csharp", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.cs" } @@ -1926,6 +1968,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.css", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.css" } @@ -1971,6 +2016,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.cython", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.cython" } @@ -2016,6 +2064,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.d", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.d" } @@ -2061,6 +2112,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.dart", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.dart" } @@ -2106,6 +2160,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.diff", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.diff" } @@ -2151,6 +2208,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.dockerfile", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.dockerfile" } @@ -2196,6 +2256,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.dot", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.dot" } @@ -2241,6 +2304,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.elixir", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.elixir" } @@ -2286,6 +2352,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.erlang", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.erlang" } @@ -2331,6 +2400,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.fortran", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.fortran" } @@ -2376,6 +2448,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.fsharp", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.fsharp" } @@ -2421,6 +2496,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.gleam", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.gleam" } @@ -2466,6 +2544,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.glsl", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.glsl" } @@ -2511,6 +2592,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.gnuplot", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.gnuplot" } @@ -2556,6 +2640,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.go", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.go" } @@ -2601,6 +2688,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.graphql", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.graphql" } @@ -2646,6 +2736,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.groovy", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.groovy" } @@ -2691,6 +2784,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.handlebars", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.html.handlebars" } @@ -2736,6 +2832,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.html", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.html.basic" } @@ -2781,6 +2880,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.http", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.http" } @@ -2826,6 +2928,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.ini", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.ini" } @@ -2871,6 +2976,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.java", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.java" } @@ -2916,6 +3024,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.javascript", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.js" } @@ -2961,6 +3072,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.json", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.json" } @@ -3006,6 +3120,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.json5", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.json" } @@ -3051,6 +3168,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.jsonnet", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.jsonnet" } @@ -3096,6 +3216,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.julia", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.julia" } @@ -3141,6 +3264,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.kotlin", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.kotlin" } @@ -3186,6 +3312,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.latex", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.tex.latex" } @@ -3231,6 +3360,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.less", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.css.less" } @@ -3276,6 +3408,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.lua", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.lua" } @@ -3321,6 +3456,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.makefile", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.makefile" } @@ -3366,6 +3504,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.matlab", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.matlab" } @@ -3411,6 +3552,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.meson", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.meson" } @@ -3456,6 +3600,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.nginx", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.nginx" } @@ -3501,6 +3648,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.nim", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.nim" } @@ -3546,6 +3696,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.nix", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.nix" } @@ -3591,6 +3744,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.objective-c", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.objc" } @@ -3636,6 +3792,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.ocaml", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.ocaml" } @@ -3681,6 +3840,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.org", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.org" } @@ -3726,6 +3888,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.perl", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.perl" } @@ -3771,6 +3936,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.php", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.php" } @@ -3816,6 +3984,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.powershell", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.powershell" } @@ -3861,6 +4032,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.prolog", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.prolog" } @@ -3906,6 +4080,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.promql", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.promql" } @@ -3951,6 +4128,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.properties", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.ini" } @@ -3996,6 +4176,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.pug", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.pug" } @@ -4041,6 +4224,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.puppet", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.puppet" } @@ -4086,6 +4272,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.python", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.python" } @@ -4131,6 +4320,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.qml", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.qml" } @@ -4176,6 +4368,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.r", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.r" } @@ -4221,6 +4416,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.racket", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.racket" } @@ -4266,6 +4464,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.restructuredtext", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.rst" } @@ -4311,6 +4512,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.robotframework", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.robotframework" } @@ -4356,6 +4560,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.ruby", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.ruby" } @@ -4401,6 +4608,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.rust", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.rust" } @@ -4446,6 +4656,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.sass", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.sass" } @@ -4491,6 +4704,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.scala", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.scala" } @@ -4536,6 +4752,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.scheme", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.scheme" } @@ -4581,6 +4800,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.scss", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.css.scss" } @@ -4626,6 +4848,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.shellscript", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.shell" } @@ -4671,6 +4896,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.smalltalk", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.smalltalk" } @@ -4716,6 +4944,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.solidity", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.solidity" } @@ -4761,6 +4992,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.sparql", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.sparql" } @@ -4806,6 +5040,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.sql", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.sql" } @@ -4851,6 +5088,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.swift", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.swift" } @@ -4896,6 +5136,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.tcl", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.tcl" } @@ -4941,6 +5184,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.terraform", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.hcl.terraform" } @@ -4986,6 +5232,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.toml", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.toml" } @@ -5031,6 +5280,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.tsx", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.tsx" } @@ -5076,6 +5328,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.twig", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.twig" } @@ -5121,6 +5376,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.typescript", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.ts" } @@ -5166,6 +5424,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.vbnet", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.asp.vb.net" } @@ -5211,6 +5472,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.verilog", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.verilog" } @@ -5256,6 +5520,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.vhdl", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.vhdl" } @@ -5301,6 +5568,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.vim", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.viml" } @@ -5346,6 +5616,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.wast", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.wat" } @@ -5391,6 +5664,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.wgsl", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.wgsl" } @@ -5436,6 +5712,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.xml", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.xml" } @@ -5481,6 +5760,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.xslt", "patterns": [ + { + "include": "#snippet" + }, { "include": "text.xml.xsl" } @@ -5526,6 +5808,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.yaml", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.yaml" } @@ -5571,6 +5856,9 @@ "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", "contentName": "meta.embedded.block.zig", "patterns": [ + { + "include": "#snippet" + }, { "include": "source.zig" } @@ -5656,7 +5944,12 @@ { "begin": "(?:^|\\G)", "while": "(?:^|\\G)(?![ \\t]*(`{3,}|~{3,})[ \\t]*$)", - "contentName": "markup.raw.block.markdown" + "contentName": "markup.raw.block.markdown", + "patterns": [ + { + "include": "#snippet" + } + ] } ] }