Skip to content

Commit 7d38b39

Browse files
committed
Syntax: Add support for KDL fenced code blocks
auto-v1/2-selection variant `kdl` as well as forced v1/v2 variants `kdl1` and `kdl2`
1 parent 9f031ee commit 7d38b39

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

syntaxes/Markdown.sublime-syntax

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,9 @@ contexts:
13921392
- include: fenced-jade
13931393
- include: fenced-julia
13941394
- include: fenced-kotlin
1395+
- include: fenced-kdl
1396+
- include: fenced-kdl1
1397+
- include: fenced-kdl2
13951398
- include: fenced-less
13961399
- include: fenced-mermaid
13971400
- include: fenced-nim
@@ -2789,6 +2792,72 @@ contexts:
27892792
1: punctuation.definition.raw.code-fence.end.markdown
27902793
2: meta.fold.code-fence.end.markdown
27912794
2795+
fenced-kdl:
2796+
- match: |-
2797+
(?x)
2798+
{{fenced_code_block_start}}
2799+
(?i:\s*(kdl))
2800+
{{fenced_code_block_trailing_infostring_characters}}
2801+
captures:
2802+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2803+
2: punctuation.definition.raw.code-fence.begin.markdown
2804+
5: constant.other.language-name.markdown
2805+
6: comment.line.infostring.markdown
2806+
7: meta.fold.code-fence.begin.markdown
2807+
embed: scope:text.kdl
2808+
embed_scope:
2809+
markup.raw.code-fence.kdl.markdown-gfm
2810+
text.kdl
2811+
escape: '{{fenced_code_block_escape}}'
2812+
escape_captures:
2813+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2814+
1: punctuation.definition.raw.code-fence.end.markdown
2815+
2: meta.fold.code-fence.end.markdown
2816+
2817+
fenced-kdl1:
2818+
- match: |-
2819+
(?x)
2820+
{{fenced_code_block_start}}
2821+
(?i:\s*(kdl1))
2822+
{{fenced_code_block_trailing_infostring_characters}}
2823+
captures:
2824+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2825+
2: punctuation.definition.raw.code-fence.begin.markdown
2826+
5: constant.other.language-name.markdown
2827+
6: comment.line.infostring.markdown
2828+
7: meta.fold.code-fence.begin.markdown
2829+
embed: scope:text.kdl.1
2830+
embed_scope:
2831+
markup.raw.code-fence.kdl.markdown-gfm
2832+
text.kdl.1
2833+
escape: '{{fenced_code_block_escape}}'
2834+
escape_captures:
2835+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2836+
1: punctuation.definition.raw.code-fence.end.markdown
2837+
2: meta.fold.code-fence.end.markdown
2838+
2839+
fenced-kdl2:
2840+
- match: |-
2841+
(?x)
2842+
{{fenced_code_block_start}}
2843+
(?i:\s*(kdl2))
2844+
{{fenced_code_block_trailing_infostring_characters}}
2845+
captures:
2846+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2847+
2: punctuation.definition.raw.code-fence.begin.markdown
2848+
5: constant.other.language-name.markdown
2849+
6: comment.line.infostring.markdown
2850+
7: meta.fold.code-fence.begin.markdown
2851+
embed: scope:text.kdl.2
2852+
embed_scope:
2853+
markup.raw.code-fence.kdl.markdown-gfm
2854+
text.kdl.2
2855+
escape: '{{fenced_code_block_escape}}'
2856+
escape_captures:
2857+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2858+
1: punctuation.definition.raw.code-fence.end.markdown
2859+
2: meta.fold.code-fence.end.markdown
2860+
27922861
fenced-less:
27932862
- match: |-
27942863
(?x)

0 commit comments

Comments
 (0)