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