diff --git a/.changeset/eighty-maps-trade.md b/.changeset/eighty-maps-trade.md new file mode 100644 index 00000000..ed872976 --- /dev/null +++ b/.changeset/eighty-maps-trade.md @@ -0,0 +1,7 @@ +--- +"@marko/language-server": patch +"@marko/language-tools": patch +"marko-vscode": patch +--- + +Add highlighting for html-script and html-style tags. diff --git a/packages/vscode/syntaxes/marko.tmLanguage.json b/packages/vscode/syntaxes/marko.tmLanguage.json index a36c7327..7d470e43 100644 --- a/packages/vscode/syntaxes/marko.tmLanguage.json +++ b/packages/vscode/syntaxes/marko.tmLanguage.json @@ -391,7 +391,7 @@ }, { "comment": "Concise style tag less", - "begin": "^(\\s*)(?=style\\b[^\\s]*\\.less\\b)", + "begin": "^(\\s*)(?=(?:html-)?style\\b[^\\s]*\\.less\\b)", "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))", "patterns": [ { "include": "#concise-open-tag-content" }, @@ -401,7 +401,7 @@ }, { "comment": "Concise style tag scss", - "begin": "^(\\s*)(?=style\\b[^\\s]*\\.scss\\b)", + "begin": "^(\\s*)(?=(?:html-)?style\\b[^\\s]*\\.scss\\b)", "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))", "patterns": [ { "include": "#concise-open-tag-content" }, @@ -411,7 +411,7 @@ }, { "comment": "Concise style tag js/ts", - "begin": "^(\\s*)(?=style\\b[^\\s]*\\.[tj]s\\b)", + "begin": "^(\\s*)(?=(?:html-)?style\\b[^\\s]*\\.[tj]s\\b)", "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))", "patterns": [ { "include": "#concise-open-tag-content" }, @@ -421,7 +421,7 @@ }, { "comment": "Concise style tag", - "begin": "^(\\s*)(?=style\\b)", + "begin": "^(\\s*)(?=(?:html-)?style\\b)", "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))", "patterns": [ { "include": "#concise-open-tag-content" }, @@ -431,7 +431,7 @@ }, { "comment": "Concise script tag", - "begin": "^(\\s*)(?=script\\b)", + "begin": "^(\\s*)(?=(?:html-)?script\\b)", "while": "(?=^(?:[})\\]`]|\\*/|\\1\\s+(\\S|$)))", "patterns": [ { "include": "#concise-open-tag-content" }, @@ -851,15 +851,15 @@ }, { "comment": "HTML style tag with less", - "begin": "\\s*(<)(?=style\\b[^\\s]*\\.less\\b)", - "end": "/>|(?<=)", + "begin": "\\s*(<)(?=(?:html-)?style\\b[^\\s]*\\.less\\b)", + "end": "/>|(?<=)", "patterns": [ { "include": "#open-tag-content" }, { "comment": "Style body content", "contentName": "source.less", "begin": ">", - "end": "\\s*()", + "end": "\\s*()", "patterns": [{ "include": "#content-embedded-style-less" }], "beginCaptures": { "0": { "name": "punctuation.definition.tag.end.marko" } @@ -880,15 +880,15 @@ }, { "comment": "HTML style tag with scss", - "begin": "\\s*(<)(?=style\\b[^\\s]*\\.scss\\b)", - "end": "/>|(?<=)", + "begin": "\\s*(<)(?=(?:html-)?style\\b[^\\s]*\\.scss\\b)", + "end": "/>|(?<=)", "patterns": [ { "include": "#open-tag-content" }, { "comment": "Style body content", "contentName": "source.scss", "begin": ">", - "end": "\\s*()", + "end": "\\s*()", "patterns": [{ "include": "#content-embedded-style-scss" }], "beginCaptures": { "0": { "name": "punctuation.definition.tag.end.marko" } @@ -909,15 +909,15 @@ }, { "comment": "HTML style tag with js/ts", - "begin": "\\s*(<)(?=style\\b[^\\s]*\\.[tj]s\\b)", - "end": "/>|(?<=)", + "begin": "\\s*(<)(?=(?:html-)?style\\b[^\\s]*\\.[tj]s\\b)", + "end": "/>|(?<=)", "patterns": [ { "include": "#open-tag-content" }, { "comment": "Style body content", "contentName": "source.ts", "begin": ">", - "end": "\\s*()", + "end": "\\s*()", "patterns": [{ "include": "#content-embedded-script" }], "beginCaptures": { "0": { "name": "punctuation.definition.tag.end.marko" } @@ -938,8 +938,8 @@ }, { "comment": "HTML style tag", - "begin": "\\s*(<)(?=style\\b)", - "end": "/>|(?<=)", + "begin": "\\s*(<)(?=(?:html-)?style\\b)", + "end": "/>|(?<=)", "beginCaptures": { "1": { "name": "punctuation.definition.tag.begin.marko" } }, @@ -952,7 +952,7 @@ "comment": "Style body content", "contentName": "source.css", "begin": ">", - "end": "\\s*()", + "end": "\\s*()", "patterns": [{ "include": "#content-embedded-style" }], "beginCaptures": { "0": { "name": "punctuation.definition.tag.end.marko" } @@ -967,15 +967,15 @@ }, { "comment": "HTML script tag", - "begin": "\\s*(<)(?=script\\b)", - "end": "/>|(?<=)", + "begin": "\\s*(<)(?=(?:html-)?script\\b)", + "end": "/>|(?<=)", "patterns": [ { "include": "#open-tag-content" }, { "comment": "Script body content", "contentName": "source.ts", "begin": ">", - "end": "\\s*()", + "end": "\\s*()", "patterns": [{ "include": "#content-embedded-script" }], "beginCaptures": { "0": { "name": "punctuation.definition.tag.end.marko" }