Skip to content

Commit

Permalink
Optimize ExtendedPatternCharacter given previous if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
jviereck committed Mar 11, 2020
1 parent 23d58b4 commit e929267
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@
// PatternCharacter
return createCharacter(res);
}
else if (!hasUnicodeFlag && (res = matchReg(/^[^^$\\.*+?(){[|]/))) {
else if (!hasUnicodeFlag && (res = matchReg(/^(?:]|})/))) {
// ExtendedPatternCharacter
return createCharacter(res);
}
Expand Down

0 comments on commit e929267

Please sign in to comment.