From f776080e65180800bea980253808940678a765dc Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Thu, 20 May 2021 10:50:08 +0800 Subject: [PATCH] Fixed svg end tag token https://github.com/microsoft/vscode/issues/124215 --- extensions/html/syntaxes/html.tmLanguage.json | 46 ++++++++++++------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/extensions/html/syntaxes/html.tmLanguage.json b/extensions/html/syntaxes/html.tmLanguage.json index 1e1c85c899f05..7e95eefd045e7 100644 --- a/extensions/html/syntaxes/html.tmLanguage.json +++ b/extensions/html/syntaxes/html.tmLanguage.json @@ -1078,40 +1078,52 @@ "name": "punctuation.definition.tag.end.html" } }, - "end": "(?i)()", + "end": "\\s*(>)", "endCaptures": { "0": { - "name": "meta.tag.structure.$2.end.html" + "name": "meta.tag.structure.svg.end.html" }, "1": { - "name": "punctuation.definition.tag.begin.html" - }, - "2": { - "name": "entity.name.tag.html" - }, - "3": { "name": "punctuation.definition.tag.end.html" } }, "name": "meta.element.structure.$2.html", "patterns": [ { - "begin": "(?)\\G", - "end": ">", + "begin": "\\G", + "end": "(?i)()\\G", + "end": ">", + "endCaptures": { + "0": { + "name": "punctuation.definition.tag.end.html" + } + }, + "name": "meta.tag.structure.start.html", + "patterns": [ + { + "include": "#attribute" + } + ] + }, + { + "include": "#tags" } ] - }, - { - "include": "#tags" } ] } @@ -2640,4 +2652,4 @@ ] } } -} \ No newline at end of file +}