Skip to content

Commit d8cce48

Browse files
committed
Update markdown grammar
1 parent cd1a6b4 commit d8cce48

1 file changed

Lines changed: 38 additions & 2 deletions

File tree

extensions/markdown-basics/syntaxes/markdown.tmLanguage.json

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/ee6a11d0bbbe8ef6bcf8e664f446c00fb14212f2",
7+
"version": "https://github.com/microsoft/vscode-markdown-tm-grammar/commit/11cf764606cb2cde54badb5d0e5a0758a8871c4b",
88
"name": "Markdown",
99
"scopeName": "text.html.markdown",
1010
"patterns": [
@@ -120,6 +120,9 @@
120120
{
121121
"include": "#fenced_code_block_json"
122122
},
123+
{
124+
"include": "#fenced_code_block_jsonc"
125+
},
123126
{
124127
"include": "#fenced_code_block_less"
125128
},
@@ -1196,6 +1199,39 @@
11961199
}
11971200
]
11981201
},
1202+
"fenced_code_block_jsonc": {
1203+
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(jsonc)(\\s+[^`~]*)?$)",
1204+
"name": "markup.fenced_code.block.markdown",
1205+
"end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
1206+
"beginCaptures": {
1207+
"3": {
1208+
"name": "punctuation.definition.markdown"
1209+
},
1210+
"5": {
1211+
"name": "fenced_code.block.language"
1212+
},
1213+
"6": {
1214+
"name": "fenced_code.block.language.attributes"
1215+
}
1216+
},
1217+
"endCaptures": {
1218+
"3": {
1219+
"name": "punctuation.definition.markdown"
1220+
}
1221+
},
1222+
"patterns": [
1223+
{
1224+
"begin": "(^|\\G)(\\s*)(.*)",
1225+
"while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
1226+
"contentName": "meta.embedded.block.jsonc",
1227+
"patterns": [
1228+
{
1229+
"include": "source.json.comments"
1230+
}
1231+
]
1232+
}
1233+
]
1234+
},
11991235
"fenced_code_block_less": {
12001236
"begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(less)(\\s+[^`~]*)?$)",
12011237
"name": "markup.fenced_code.block.markdown",
@@ -1984,7 +2020,7 @@
19842020
"name": "punctuation.definition.string.end.markdown"
19852021
}
19862022
},
1987-
"match": "(?x)\n \\s* # Leading whitespace\n (\\[)([\\w ]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (<?)(\\S+?)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in quotes…\n | ((\").+?(\")) # or in parens.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n",
2023+
"match": "(?x)\n \\s* # Leading whitespace\n (\\[)([^]]+?)(\\])(:) # Reference name\n [ \\t]* # Optional whitespace\n (<?)(\\S+?)(>?) # The url\n [ \\t]* # Optional whitespace\n (?:\n ((\\().+?(\\))) # Match title in quotes…\n | ((\").+?(\")) # or in parens.\n )? # Title is optional\n \\s* # Optional whitespace\n $\n",
19882024
"name": "meta.link.reference.def.markdown"
19892025
},
19902026
"list_paragraph": {

0 commit comments

Comments
 (0)