Browse Source

vscode: Fix highlighting of } before keywords.

Qi Xiao 1 year ago
parent
commit
c853e4388f
2 changed files with 3 additions and 3 deletions
  1. 1 1
      vscode/package.json
  2. 2 2
      vscode/syntaxes/elvish.tmLanguage.json

+ 1 - 1
vscode/package.json

@@ -2,7 +2,7 @@
     "name": "elvish",
     "displayName": "Elvish",
     "description": "Elvish language support for Visual Studio Code",
-    "version": "0.1.3",
+    "version": "0.1.4",
     "publisher": "elves",
     "license": "BSD-2-Clause",
     "icon": "icon.png",

+ 2 - 2
vscode/syntaxes/elvish.tmLanguage.json

@@ -56,7 +56,7 @@
 			}
 		},
 		{
-			"match": "}\\s+(catch|except)\\s+([\\w\\d_:~-]+)",
+			"match": "(?<=})\\s+(catch|except)\\s+([\\w\\d_:~-]+)",
 			"captures": {
 				"1": {
 					"name": "keyword.control.elvish"
@@ -101,7 +101,7 @@
 			}
 		},
 		{
-			"match": "}\\s+(elif|else|catch|except|finally)(?=[\\s)}<>;|&])",
+			"match": "(?<=})\\s+(elif|else|catch|except|finally)(?=[\\s)}<>;|&])",
 			"captures": {
 				"1": {
 					"name": "keyword.control.elvish"