Skip to content
This repository was archived by the owner on Oct 1, 2022. It is now read-only.

Commit f5d5b54

Browse files
committed
feat: syntax highlight in *.MD code blocks
1 parent e669f97 commit f5d5b54

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

syntaxes/codeblock.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"fileTypes": [],
3+
"injectionSelector": "L:text.html.markdown",
4+
"patterns": [
5+
{
6+
"include": "#feature-code-block"
7+
}
8+
],
9+
"repository": {
10+
"feature-code-block": {
11+
"begin": "(^|\\G)(\\s*)(\\`{3,}|~{3,})\\s*(?i:(feature)(\\s+[^`~]*)?$)",
12+
"name": "markup.fenced_code.block.markdown",
13+
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
14+
"beginCaptures": {
15+
"3": {
16+
"name": "punctuation.definition.markdown"
17+
},
18+
"5": {
19+
"name": "fenced_code.block.language"
20+
},
21+
"6": {
22+
"name": "fenced_code.block.language.attributes"
23+
}
24+
},
25+
"endCaptures": {
26+
"3": {
27+
"name": "punctuation.definition.markdown"
28+
}
29+
},
30+
"patterns": [
31+
{
32+
"begin": "(^|\\G)(\\s*)(.*)",
33+
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
34+
"contentName": "meta.embedded.block.feature",
35+
"patterns": [
36+
{
37+
"include": "text.gherkin.feature"
38+
}
39+
]
40+
}
41+
]
42+
}
43+
},
44+
"scopeName": "text.gherkin.feature"
45+
}

0 commit comments

Comments
 (0)