Skip to content

Commit 2bc4cdf

Browse files
committed
Remove untargetable characters from scopeNames
1 parent 4021a98 commit 2bc4cdf

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

syntaxes/JSON.tmLanguage.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@
6262
"name": "meta.structure.dictionary.json",
6363
"patterns": [
6464
{
65-
"begin": "(?=\"((?>[^\\\\\"]++|\\\\.)*+)\")",
65+
"comment": "Apply a targetable scopeName to the entire object. Attempt to remove all non-scope characters; as they are not targetable",
66+
"begin": "(?=\"\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(?<scope>(?>[0-9A-Za-z_.:-]++|\\\\u00(?i:2[DE]|3[0-9A]|4[1-9A-F]|5[0-9AF]|6[1-9A-F]|7[0-9A]))*+)\\g<separator>(?<string>(?>[^\\\\\"]++|\\\\.)*+)(?<separator>(?>[^0-9A-Za-z_.:\\\\\"]++|\\\\u(?!00(?i:2[DE]|3[0-9A]|4[1-9A-F]|5[0-9AF]|6[1-9A-F]|7[0-9A]))\\h{1,4}|\\\\.?)*+){0}\")",
6667
"end": "(?!\\G)(?<=,)|(?=})",
67-
"name": ".meta.embedded.$1.",
68+
"name": ".meta.embedded.$1$2$3$4$5$6$7$8$9.",
6869
"patterns": [ { "include": "#objectpair" } ]
6970
},
7071
{ "include": "#objectpair" }

syntaxes/JSONC.tmLanguage.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@
6262
"name": "meta.structure.dictionary.json.comments",
6363
"patterns": [
6464
{
65-
"begin": "(?=\"((?>[^\\\\\"]++|\\\\.)*+)\")",
65+
"comment": "Apply a targetable scopeName to the entire object. Attempt to remove all non-scope characters; as they are not targetable",
66+
"begin": "(?=\"\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(\\g<scope>)\\g<separator>(?<scope>(?>[0-9A-Za-z_.:-]++|\\\\u00(?i:2[DE]|3[0-9A]|4[1-9A-F]|5[0-9AF]|6[1-9A-F]|7[0-9A]))*+)\\g<separator>(?<string>(?>[^\\\\\"]++|\\\\.)*+)(?<separator>(?>[^0-9A-Za-z_.:\\\\\"]++|\\\\u(?!00(?i:2[DE]|3[0-9A]|4[1-9A-F]|5[0-9AF]|6[1-9A-F]|7[0-9A]))\\h{1,4}|\\\\.?)*+){0}\")",
6667
"end": "(?!\\G)(?<=,)|(?=})",
67-
"name": ".meta.embedded.$1.",
68+
"name": ".meta.embedded.$1$2$3$4$5$6$7$8$9.",
6869
"patterns": [ { "include": "#objectpair" } ]
6970
},
7071
{ "include": "#objectpair" }

0 commit comments

Comments
 (0)