mirror of
https://github.com/kristoferssolo/solorice.git
synced 2025-10-21 20:10:34 +00:00
38 lines
1.5 KiB
JSON
38 lines
1.5 KiB
JSON
{
|
|
"fileTypes": [],
|
|
"injectionSelector": "meta.paragraph.markdown - markup.inserted - meta.embedded",
|
|
"patterns": [
|
|
{
|
|
"include": "#math-inline"
|
|
}
|
|
],
|
|
"repository": {
|
|
"math-inline": {
|
|
"name": "markup.inserted.math.inline.markdown",
|
|
"begin": "(?x) #turn on extended mode\n (?<!^\\\\)(?<![^\\\\][\\$\\\\]) #without '$' and '\\' on the left\n (\\$) #a '$'\n (?![\\s\\$]) #without whitespace and '$' on the right\n (?=((?!\\s\\$).)* #not match ' $'\n (?<!\\\\)((\\\\{2})*(\\\\\\$)?)(?<!\\s)(\\$)(?![0-9]) #match the end '$'\n ) #ensure math closed\n",
|
|
"end": "(?x) #turn on extended mode\n (?<![^\\\\][\\$\\\\])(?<!\\s) #without '$' '\\' and whitespace on the left\n (\\$) #a '$'\n (?![0-9]) #without number on the right\n (?!((\\$)(?![\\s\\$])(?=((?!\\s\\$).)+((?<![^\\\\][\\$\\\\])(?<!\\s)(\\$)(?![0-9]))))) #without a begin '$' on the right\n",
|
|
"captures": {
|
|
"1": {
|
|
"name": "punctuation.definition.math.inline.markdown"
|
|
}
|
|
},
|
|
"contentName": "meta.embedded.block.katex",
|
|
"patterns": [
|
|
{
|
|
"name": "markup.inserted.math.inline.markdown",
|
|
"match": "(?<![^\\\\][\\$\\\\])(?<!\\s)(\\$\\$)",
|
|
"comment": "match a end '$' and a begin '$'",
|
|
"captures": {
|
|
"1": {
|
|
"name": "punctuation.definition.math.inline.markdown"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"include": "text.katex"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"scopeName": "markdown.math_inline"
|
|
} |