Allow non-word character after inline math code block

Fixes #136584
This commit is contained in:
Matt Bierner
2021-11-08 17:43:46 -08:00
parent 9b455176e9
commit 0eee604f01
3 changed files with 221 additions and 3 deletions

View File

@@ -3,16 +3,39 @@
"injectionSelector": "L:meta.paragraph.markdown - (comment, string, markup.math.inline.markdown, markup.fenced_code.block.markdown)",
"patterns": [
{
"include": "#math_inline"
"include": "#math_inline_double"
},
{
"include": "#math_inline_single"
},
{
"include": "#math_inline_block"
}
],
"repository": {
"math_inline": {
"math_inline_single": {
"name": "markup.math.inline.markdown",
"match": "(?<=\\s|^)(\\${1,2})(.+?)(\\${1,2})(?=\\s|$)",
"match": "(?<=\\s|\\W|^)(?<!\\$)(\\$)(.+?)(\\$)(?!\\$)(?=\\s|\\W|$)",
"captures": {
"1": {
"name": "punctuation.definition.math.begin.markdown"
},
"2": {
"name": "meta.embedded.math.markdown",
"patterns": [
{
"include": "text.html.markdown.math#math"
}
]
},
"3": {
"name": "punctuation.definition.math.begin.markdown"
}
}
},
"math_inline_double": {
"name": "markup.math.inline.markdown",
"match": "(?<=\\s|\\W|^)(?<!\\$)(\\$\\$)(.+?)(\\$\\$)(?!\\$)(?=\\s|\\W|$)",
"captures": {
"1": {
"name": "punctuation.definition.math.begin.markdown"