From 444e5a680775b938a6348bff424f3c32e753af0a Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Fri, 28 May 2021 11:52:27 -0400 Subject: [PATCH] Prevent blocks from locking up vscode extension (#269) --- .../syntaxes/astro-markdown.tmLanguage.json | 36 ------------------- .../syntaxes/astro.tmLanguage.json | 35 ++++++++---------- 2 files changed, 15 insertions(+), 56 deletions(-) diff --git a/tools/astro-vscode/syntaxes/astro-markdown.tmLanguage.json b/tools/astro-vscode/syntaxes/astro-markdown.tmLanguage.json index 74cbcf282..46a6e97cb 100644 --- a/tools/astro-vscode/syntaxes/astro-markdown.tmLanguage.json +++ b/tools/astro-vscode/syntaxes/astro-markdown.tmLanguage.json @@ -2200,42 +2200,6 @@ "end": "(-->)", "name": "comment.block.html" }, - { - "begin": "(?i)(^|\\G)\\s*(?=<(script|style|pre)(\\s|$|>)(?!.*?))", - "end": "(?i)(.*)(())", - "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)^(?!.*)" - } - ] - }, { "begin": "(?i)(?=))", "while": "(?i)^(?!.*)", diff --git a/tools/astro-vscode/syntaxes/astro.tmLanguage.json b/tools/astro-vscode/syntaxes/astro.tmLanguage.json index a85139cb2..271f5f1d1 100644 --- a/tools/astro-vscode/syntaxes/astro.tmLanguage.json +++ b/tools/astro-vscode/syntaxes/astro.tmLanguage.json @@ -714,39 +714,34 @@ ] }, "astro-markdown": { - "begin": "(?:^\\s+)?(<)(Markdown)\\b(?=[^>]*)", + "name": "text.html.astro.markdown", + "begin": "(<)(Markdown)(>)", "beginCaptures": { "1": { - "name": "punctuation.definition.tag.begin.html" + "name":"punctuation.definition.tag.begin.html" }, "2": { - "name": "entity.name.tag.markdown.astro" + "name": "entity.name.tag.html" + }, + "3": { + "name":"punctuation.definition.tag.end.html" } }, "end": "()", "endCaptures": { + "1": { + "name":"punctuation.definition.tag.begin.html" + }, "2": { - "name": "punctuation.definition.tag.html" + "name": "entity.name.tag.html" + }, + "3": { + "name":"punctuation.definition.tag.end.html" } }, - "name": "text.html.markdown.astro", "patterns": [ { - "include": "#tag-stuff" - }, - { - "begin": "(>)", - "beginCaptures": { - "1": { - "name": "punctuation.definition.tag.end.html" - } - }, - "end": "(?=