Prevent <Markdown> blocks from locking up vscode extension (#269)

This commit is contained in:
Matthew Phillips 2021-05-28 11:52:27 -04:00 committed by GitHub
parent f366520995
commit 444e5a6807
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 56 deletions

View file

@ -2200,42 +2200,6 @@
"end": "(-->)", "end": "(-->)",
"name": "comment.block.html" "name": "comment.block.html"
}, },
{
"begin": "(?i)(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?</(script|style|pre)>))",
"end": "(?i)(.*)((</)(script|style|pre)(>))",
"endCaptures": {
"1": {
"patterns": [
{
"include": "text.html.markdown.astro"
}
]
},
"2": {
"name": "meta.tag.structure.$4.end.html"
},
"3": {
"name": "punctuation.definition.tag.begin.html"
},
"4": {
"name": "entity.name.tag.html"
},
"5": {
"name": "punctuation.definition.tag.end.html"
}
},
"patterns": [
{
"begin": "(\\s*|$)",
"patterns": [
{
"include": "text.html.markdown.astro"
}
],
"while": "(?i)^(?!.*</(script|style|pre|Markdown)>)"
}
]
},
{ {
"begin": "(?i)(?=</?[a-zA-Z]+[^\\s/&gt;]*(\\s|$|/?>))", "begin": "(?i)(?=</?[a-zA-Z]+[^\\s/&gt;]*(\\s|$|/?>))",
"while": "(?i)^(?!.*</(\\1||\\2)>)", "while": "(?i)^(?!.*</(\\1||\\2)>)",

View file

@ -714,39 +714,34 @@
] ]
}, },
"astro-markdown": { "astro-markdown": {
"begin": "(?:^\\s+)?(<)(Markdown)\\b(?=[^>]*)", "name": "text.html.astro.markdown",
"begin": "(<)(Markdown)(>)",
"beginCaptures": { "beginCaptures": {
"1": { "1": {
"name": "punctuation.definition.tag.begin.html" "name":"punctuation.definition.tag.begin.html"
}, },
"2": { "2": {
"name": "entity.name.tag.markdown.astro" "name": "entity.name.tag.html"
},
"3": {
"name":"punctuation.definition.tag.end.html"
} }
}, },
"end": "(</)(Markdown)(>)", "end": "(</)(Markdown)(>)",
"endCaptures": { "endCaptures": {
"1": {
"name":"punctuation.definition.tag.begin.html"
},
"2": { "2": {
"name": "punctuation.definition.tag.html" "name": "entity.name.tag.html"
},
"3": {
"name":"punctuation.definition.tag.end.html"
} }
}, },
"name": "text.html.markdown.astro",
"patterns": [ "patterns": [
{ {
"include": "#tag-stuff" "include": "text.html.markdown.astro"
},
{
"begin": "(>)",
"beginCaptures": {
"1": {
"name": "punctuation.definition.tag.end.html"
}
},
"end": "(?=</Markdown)",
"patterns": [
{
"include": "text.html.markdown.astro"
}
]
} }
] ]
}, },