Disable markdown math inside of raw code blocks

For #135254
This commit is contained in:
Matt Bierner 2021-10-20 13:00:58 -07:00
parent 91d2bdded2
commit 04f51add61
No known key found for this signature in database
GPG key ID: 099C331567E11888
3 changed files with 73 additions and 1 deletions

View file

@ -1,6 +1,6 @@
{
"fileTypes": [],
"injectionSelector": "L:text.html.markdown - (comment, string, meta.paragraph.markdown, markup.math.block.markdown, markup.fenced_code.block.markdown)",
"injectionSelector": "L:text.html.markdown - (comment, string, meta.paragraph.markdown, markup.math.block.markdown, markup.fenced_code.block.markdown, markup.raw.block.markdown)",
"patterns": [
{
"include": "#double_dollar_math_block"

View file

@ -95,3 +95,9 @@ $$
\text{stuff}
\text {stuff}
$$
<!-- Should not highlight inside of raw code block -->
$$
\frac{1}{2}
$$

View file

@ -4607,5 +4607,71 @@
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": "<!--",
"t": "text.html.markdown comment.block.html punctuation.definition.comment.html",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
}
},
{
"c": " Should not highlight inside of raw code block ",
"t": "text.html.markdown comment.block.html",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
}
},
{
"c": "-->",
"t": "text.html.markdown comment.block.html punctuation.definition.comment.html",
"r": {
"dark_plus": "comment: #6A9955",
"light_plus": "comment: #008000",
"dark_vs": "comment: #6A9955",
"light_vs": "comment: #008000",
"hc_black": "comment: #7CA668"
}
},
{
"c": " $$",
"t": "text.html.markdown markup.raw.block.markdown",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": " \\frac{1}{2}",
"t": "text.html.markdown markup.raw.block.markdown",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
},
{
"c": " $$",
"t": "text.html.markdown markup.raw.block.markdown",
"r": {
"dark_plus": "default: #D4D4D4",
"light_plus": "default: #000000",
"dark_vs": "default: #D4D4D4",
"light_vs": "default: #000000",
"hc_black": "default: #FFFFFF"
}
}
]