Skip to content

Commit

Permalink
fix: escape braces in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
amaanq committed Mar 10, 2024
1 parent 2d7bac5 commit 3a56481
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ module.exports = grammar({
seq('\\', choice(
/[^xu]/,
/u[0-9a-fA-F]{4}/,
/u{[0-9a-fA-F]+}/,
/u\{[0-9a-fA-F]+\}/,
/x[0-9a-fA-F]{2}/,
)),
/[^\\']/,
Expand All @@ -1489,7 +1489,7 @@ module.exports = grammar({
choice(
/[^xu]/,
/u[0-9a-fA-F]{4}/,
/u{[0-9a-fA-F]+}/,
/u\{[0-9a-fA-F]+\}/,
/x[0-9a-fA-F]{2}/,
),
)),
Expand Down
4 changes: 2 additions & 2 deletions src/grammar.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions src/parser.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3a56481

Please sign in to comment.