Skip to content

Commit

Permalink
Allow none-ascii word chars in named capture groups and `backrefere…
Browse files Browse the repository at this point in the history
…nces`
  • Loading branch information
RedCMD committed Mar 15, 2024
1 parent 9cf28cb commit 121aa7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syntaxes/regex.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@
},
"capture-group-name-name": {
"comment": "_name;0%>",
"begin": "(?<=(?'bracket'<)|')\\G((?~[A-Za-z_)\"]|(?('bracket')>|')))",
"begin": "(?<=(?'bracket'<)|')\\G((?~[\\w)\"&&[^0-9]]|(?('bracket')>|')))",
"end": "(\\\\(?>u\\h{,3})?)?((?((?!\\1))>|'))|(?=(\"|\\)))",
"beginCaptures": { "2": { "name": "invalid.illegal.tm markup.underline regex" } },
"endCaptures": {
Expand Down Expand Up @@ -1457,7 +1457,7 @@
},
{
"comment": "\\k<1> \\k'-2' \\k'+003' \\k<name> \\k'name_123+5' \\k<9-2>",
"match": "(?D)(\\\\{2}k)(?>((?<quote>')|<)(?>((?~|(?>(?(<quote>)'|>)|\\)|(?<!\\\\)\\\\{2}*\")|.*?))(?>(?>(?>((0*)[1-9]\\d{,2}(\\d{,2}))|([a-zA-Z_]\\w*))([-+](0*)[12]?\\d{1,9})?)|([-+](0*)[1-9]\\d*)))?((?~(?('quote')'|>)|\\)|(?<!\\\\)\\\\{2}*\"))((?('quote')'|>))?)",
"match": "(?D)(\\\\{2}k)(?>((?<quote>')|<)(?>((?~|(?>(?(<quote>)'|>)|\\)|(?<!\\\\)\\\\{2}*\")|.*?))(?>(?>(?>((0*)[1-9]\\d{,2}(\\d{,2}))|([\\w&&[^0-9]]\\w*))([-+](0*)[12]?\\d{1,9})?)|([-+](0*)[1-9]\\d*)))?((?~(?('quote')'|>)|\\)|(?<!\\\\)\\\\{2}*\"))((?('quote')'|>))?)",
"captures": {
"1": { "name": "string.regexp.tm" },
"2": { "name": "constant.character.set.regexp.tm" },
Expand Down

0 comments on commit 121aa7c

Please sign in to comment.