Skip to content

Commit 6c98306

Browse files
committed
Fix unnecessary escapes not highlighting correctly at the end of character class ranges
1 parent 95139f1 commit 6c98306

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

syntaxes/regex.tmLanguage.json

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,19 +1061,20 @@
10611061
"patterns": [
10621062
{
10631063
"begin": "-",
1064-
"end": "(?!\\G)|(\\\\{3})(\\\\)|(\\\\{2})([]\\[])|(\\\\{2})([-:^])|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2})(/)|([^]\\[\\\\])",
1064+
"end": "(?<=-\\\\{2})(.)|(?!\\G)|(\\\\{3})(\\\\)|(\\\\{2})([]\\[])|(\\\\{2})([-:^])|(\\\\{2}(?i:[DHSW]|p{[^}]*})|\\[:[^]]+:])|(\\\\{1,2})(/)|([^]\\[\\\\])",
10651065
"beginCaptures": { "0": { "name": "support.class.tm strong" } },
10661066
"endCaptures": {
1067-
"1": { "name": "constant.character.escape.tm" },
1068-
"2": { "name": "support.class.tm" },
1069-
"3": { "name": "constant.character.escape.tm" },
1070-
"4": { "name": "support.class.tm regex" },
1071-
"5": { "name": "punctuation.definition.tag.tm" },
1072-
"6": { "name": "support.class.tm regex" },
1073-
"7": { "name": "invalid.illegal.tm" },
1074-
"8": { "name": "punctuation.definition.tag.tm" },
1075-
"9": { "name": "support.class.tm" },
1076-
"10": { "name": "support.class.tm regex" }
1067+
"1": { "name": "support.class.tm regex" },
1068+
"2": { "name": "constant.character.escape.tm" },
1069+
"3": { "name": "support.class.tm" },
1070+
"4": { "name": "constant.character.escape.tm" },
1071+
"5": { "name": "support.class.tm regex" },
1072+
"6": { "name": "punctuation.definition.tag.tm" },
1073+
"7": { "name": "support.class.tm regex" },
1074+
"8": { "name": "invalid.illegal.tm" },
1075+
"9": { "name": "punctuation.definition.tag.tm" },
1076+
"10": { "name": "support.class.tm" },
1077+
"11": { "name": "support.class.tm regex" }
10771078
},
10781079
"patterns": [
10791080
{ "include": "#character-class-range-code-point" },

0 commit comments

Comments
 (0)