Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/markdown-math/syntaxes/md-math-block.tmLanguage.json
3291 views
1
{
2
"fileTypes": [],
3
"injectionSelector": "L:text.html.markdown - (comment, string, meta.paragraph.markdown, markup.math.block.markdown, markup.fenced_code.block.markdown, markup.raw.block.markdown)",
4
"patterns": [
5
{
6
"include": "#double_dollar_math_block"
7
},
8
{
9
"include": "#single_dollar_math_block"
10
}
11
],
12
"repository": {
13
"double_dollar_math_block": {
14
"name": "markup.math.block.markdown",
15
"contentName": "meta.embedded.math.markdown",
16
"begin": "(?<=^\\s*)(\\${2})(?![^$]*\\${2})",
17
"beginCaptures": {
18
"1": {
19
"name": "punctuation.definition.math.begin.markdown"
20
}
21
},
22
"end": "(.*)(\\${2})",
23
"endCaptures": {
24
"1": {
25
"name": "meta.embedded.math.markdown",
26
"patterns": [
27
{
28
"include": "text.html.markdown.math#math"
29
}
30
]
31
},
32
"2": {
33
"name": "punctuation.definition.math.end.markdown"
34
}
35
},
36
"patterns": [
37
{
38
"begin": "(^|\\G)",
39
"while": "(^|\\G)(?!.*(\\${2}))",
40
"patterns": [
41
{
42
"include": "text.html.markdown.math#math"
43
}
44
]
45
}
46
]
47
},
48
"single_dollar_math_block": {
49
"name": "markup.math.block.markdown",
50
"contentName": "meta.embedded.math.markdown",
51
"begin": "(?<=^\\s*)(\\$)(?![^$]*\\$|\\d)",
52
"beginCaptures": {
53
"1": {
54
"name": "punctuation.definition.math.begin.markdown"
55
}
56
},
57
"end": "(.*)(\\${1})",
58
"endCaptures": {
59
"1": {
60
"name": "meta.embedded.math.markdown",
61
"patterns": [
62
{
63
"include": "text.html.markdown.math#math"
64
}
65
]
66
},
67
"2": {
68
"name": "punctuation.definition.math.end.markdown"
69
}
70
},
71
"patterns": [
72
{
73
"begin": "(^|\\G)",
74
"while": "(^|\\G)(?!.*(\\${1}))",
75
"patterns": [
76
{
77
"include": "text.html.markdown.math#math"
78
}
79
]
80
}
81
]
82
}
83
},
84
"scopeName": "markdown.math.block"
85
}
86