Files
vscode/extensions/markdown-math/syntaxes/md-math-block.tmLanguage.json
2021-08-05 14:00:36 -07:00

70 lines
1.5 KiB
JSON

{
"fileTypes": [],
"injectionSelector": "L:text.html.markdown - (comment, string, meta.paragraph.markdown, markup.math.block.markdown, markup.fenced_code.block.markdown)",
"patterns": [
{
"include": "#double_dollar_math_block"
},
{
"include": "#single_dollar_math_block"
}
],
"repository": {
"double_dollar_math_block": {
"name": "markup.math.block.markdown",
"begin": "(?<=(^|\\G)\\s*)(\\${2})(?=\\s*$)",
"beginCaptures": {
"2": {
"name": "punctuation.definition.math.begin.markdown"
}
},
"end": "(\\${2})",
"endCaptures": {
"1": {
"name": "punctuation.definition.math.end.markdown"
}
},
"patterns": [
{
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!.*(\\${2}))",
"contentName": "meta.embedded.math.markdown",
"patterns": [
{
"include": "text.html.markdown.math#math"
}
]
}
]
},
"single_dollar_math_block": {
"name": "markup.math.block.markdown",
"begin": "(?<=(^|\\G)\\s*)(\\${1})(?=\\s*$)",
"beginCaptures": {
"2": {
"name": "punctuation.definition.math.begin.markdown"
}
},
"end": "(\\${1})",
"endCaptures": {
"1": {
"name": "punctuation.definition.math.end.markdown"
}
},
"patterns": [
{
"begin": "(^|\\G)(\\s*)(.*)",
"while": "(^|\\G)(?!.*(\\${1}))",
"contentName": "meta.embedded.math.markdown",
"patterns": [
{
"include": "text.html.markdown.math#math"
}
]
}
]
}
},
"scopeName": "markdown.math.block"
}