Skip to content

Commit 3a56481

Browse files
committed
fix: escape braces in regex
1 parent 2d7bac5 commit 3a56481

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

grammar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@ module.exports = grammar({
14761476
seq('\\', choice(
14771477
/[^xu]/,
14781478
/u[0-9a-fA-F]{4}/,
1479-
/u{[0-9a-fA-F]+}/,
1479+
/u\{[0-9a-fA-F]+\}/,
14801480
/x[0-9a-fA-F]{2}/,
14811481
)),
14821482
/[^\\']/,
@@ -1489,7 +1489,7 @@ module.exports = grammar({
14891489
choice(
14901490
/[^xu]/,
14911491
/u[0-9a-fA-F]{4}/,
1492-
/u{[0-9a-fA-F]+}/,
1492+
/u\{[0-9a-fA-F]+\}/,
14931493
/x[0-9a-fA-F]{2}/,
14941494
),
14951495
)),

src/grammar.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/parser.c

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)