From 6c47780242866d0148c85ea1172a60639fc6b8ca Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Thu, 20 Oct 2022 11:44:33 +0100 Subject: [PATCH] Fix `@layer` syntax highlighting (#637) --- .../syntaxes/at-rules.postcss.tmLanguage.json | 12 ++++++++++-- .../syntaxes/at-rules.scss.tmLanguage.json | 12 ++++++++++-- .../syntaxes/at-rules.tmLanguage.json | 12 ++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/vscode-tailwindcss/syntaxes/at-rules.postcss.tmLanguage.json b/packages/vscode-tailwindcss/syntaxes/at-rules.postcss.tmLanguage.json index 749db63..1a09a6d 100644 --- a/packages/vscode-tailwindcss/syntaxes/at-rules.postcss.tmLanguage.json +++ b/packages/vscode-tailwindcss/syntaxes/at-rules.postcss.tmLanguage.json @@ -91,7 +91,7 @@ "name": "punctuation.definition.keyword.css" } }, - "end": "(?<=})(?!\\G)", + "end": "(?<=}|;)(?!\\G)", "patterns": [ { "include": "source.css#comment-block" @@ -100,9 +100,17 @@ "include": "source.css.postcss#double-slash" }, { - "match": "[^\\s{]+?", + "match": "[^\\s{;,]+?", "name": "variable.parameter.layer.tailwind" }, + { + "match": ",", + "name": "punctuation.separator.list.comma.css" + }, + { + "match": ";", + "name": "punctuation.terminator.rule.css" + }, { "begin": "{", "beginCaptures": { diff --git a/packages/vscode-tailwindcss/syntaxes/at-rules.scss.tmLanguage.json b/packages/vscode-tailwindcss/syntaxes/at-rules.scss.tmLanguage.json index f29de64..aede5e1 100644 --- a/packages/vscode-tailwindcss/syntaxes/at-rules.scss.tmLanguage.json +++ b/packages/vscode-tailwindcss/syntaxes/at-rules.scss.tmLanguage.json @@ -65,14 +65,22 @@ "name": "punctuation.definition.keyword.css" } }, - "end": "\\s*(?={)", + "end": "\\s*(?={|;)", "patterns": [ { "include": "source.css#comment-block" }, { - "match": "[^\\s{]+?", + "match": "[^\\s{;,]+?", "name": "entity.name.function.scss" + }, + { + "match": ",", + "name": "punctuation.separator.delimiter.scss" + }, + { + "match": ";", + "name": "punctuation.terminator.rule.scss" } ] }, diff --git a/packages/vscode-tailwindcss/syntaxes/at-rules.tmLanguage.json b/packages/vscode-tailwindcss/syntaxes/at-rules.tmLanguage.json index 5933e54..fd1e707 100644 --- a/packages/vscode-tailwindcss/syntaxes/at-rules.tmLanguage.json +++ b/packages/vscode-tailwindcss/syntaxes/at-rules.tmLanguage.json @@ -85,15 +85,23 @@ "name": "punctuation.definition.keyword.css" } }, - "end": "(?<=})(?!\\G)", + "end": "(?<=}|;)(?!\\G)", "patterns": [ { "include": "source.css#comment-block" }, { - "match": "[^\\s{]+?", + "match": "[^\\s{;,]+?", "name": "variable.parameter.layer.tailwind" }, + { + "match": ",", + "name": "punctuation.separator.list.comma.css" + }, + { + "match": ";", + "name": "punctuation.terminator.rule.css" + }, { "begin": "{", "beginCaptures": {