Skip to content

Commit cc4318b

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 741faa6 commit cc4318b

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
@@ -1255,6 +1255,9 @@ contexts:
12551255
- include: fenced-jade
12561256
- include: fenced-julia
12571257
- include: fenced-kotlin
1258+
- include: fenced-kdl
1259+
- include: fenced-kdl1
1260+
- include: fenced-kdl2
12581261
- include: fenced-less
12591262
- include: fenced-mermaid
12601263
- include: fenced-nim
@@ -2609,6 +2612,72 @@ contexts:
26092612
1: punctuation.definition.raw.code-fence.end.markdown
26102613
2: meta.fold.code-fence.end.markdown
26112614
2615+
fenced-kdl:
2616+
- match: |-
2617+
(?x)
2618+
{{fenced_code_block_start}}
2619+
(?i:\s*(kdl))
2620+
{{fenced_code_block_trailing_infostring_characters}}
2621+
captures:
2622+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2623+
2: punctuation.definition.raw.code-fence.begin.markdown
2624+
5: constant.other.language-name.markdown
2625+
6: comment.line.infostring.markdown
2626+
7: meta.fold.code-fence.begin.markdown
2627+
embed: scope:text.kdl
2628+
embed_scope:
2629+
markup.raw.code-fence.kdl.markdown-gfm
2630+
text.kdl
2631+
escape: '{{fenced_code_block_escape}}'
2632+
escape_captures:
2633+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2634+
1: punctuation.definition.raw.code-fence.end.markdown
2635+
2: meta.fold.code-fence.end.markdown
2636+
2637+
fenced-kdl1:
2638+
- match: |-
2639+
(?x)
2640+
{{fenced_code_block_start}}
2641+
(?i:\s*(kdl1))
2642+
{{fenced_code_block_trailing_infostring_characters}}
2643+
captures:
2644+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2645+
2: punctuation.definition.raw.code-fence.begin.markdown
2646+
5: constant.other.language-name.markdown
2647+
6: comment.line.infostring.markdown
2648+
7: meta.fold.code-fence.begin.markdown
2649+
embed: scope:text.kdl.1
2650+
embed_scope:
2651+
markup.raw.code-fence.kdl.markdown-gfm
2652+
text.kdl.1
2653+
escape: '{{fenced_code_block_escape}}'
2654+
escape_captures:
2655+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2656+
1: punctuation.definition.raw.code-fence.end.markdown
2657+
2: meta.fold.code-fence.end.markdown
2658+
2659+
fenced-kdl2:
2660+
- match: |-
2661+
(?x)
2662+
{{fenced_code_block_start}}
2663+
(?i:\s*(kdl2))
2664+
{{fenced_code_block_trailing_infostring_characters}}
2665+
captures:
2666+
0: meta.code-fence.definition.begin.kdl.markdown-gfm
2667+
2: punctuation.definition.raw.code-fence.begin.markdown
2668+
5: constant.other.language-name.markdown
2669+
6: comment.line.infostring.markdown
2670+
7: meta.fold.code-fence.begin.markdown
2671+
embed: scope:text.kdl.2
2672+
embed_scope:
2673+
markup.raw.code-fence.kdl.markdown-gfm
2674+
text.kdl.2
2675+
escape: '{{fenced_code_block_escape}}'
2676+
escape_captures:
2677+
0: meta.code-fence.definition.end.kdl.markdown-gfm
2678+
1: punctuation.definition.raw.code-fence.end.markdown
2679+
2: meta.fold.code-fence.end.markdown
2680+
26122681
fenced-less:
26132682
- match: |-
26142683
(?x)

0 commit comments

Comments
 (0)