Browse Source

Merge pull request #118 from pduzinki:fix-string-highlighting

fix string literal highlighting
Geequlim 6 years ago
parent
commit
c26320ec03
1 changed files with 18 additions and 3 deletions
  1. 18 3
      configurations/GDScript.tmLanguage.json

+ 18 - 3
configurations/GDScript.tmLanguage.json

@@ -45,17 +45,32 @@
     "strings": {
       "patterns": [{
           "begin": "\"",
-          "end": "(?<!\\\\)\"",
+          "end": "\"",
+          "patterns": [
+            {  "name": "constant.character.escape.untitled",
+                "match": "\\."
+            }
+          ],
           "name": "string.quoted.double.gdscript"
         },
         {
           "begin": "'",
-          "end": "(?<!\\\\)'",
+          "end": "'",
+          "patterns": [
+            {  "name": "constant.character.escape.untitled",
+                "match": "\\."
+            }
+          ],
           "name": "string.quoted.single.gdscript"
         },
         {
           "begin": "@\"",
-          "end": "(?<!\\\\)\"",
+          "end": "\"",
+          "patterns": [
+            {  "name": "constant.character.escape.untitled",
+                "match": "\\."
+            }
+          ],
           "name": "string.nodepath.gdscript"
         }
       ]