Skip to content

Commit

Permalink
Fix \u{...} not recognized when it contains a letter
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenwdv authored Aug 11, 2022
1 parent db7f698 commit 5f333a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/src/ExpressionLexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export default class ExpressionLexer {
if ((i = sub.indexOf("\\E")) !== -1) { token.l += i + 2; e+=2; }
else { token.l += closeIndex - token.i - 1; }
token.value = str.substr(token.i+2, token.l-e);
} else if (profile.tokens.escunicodeub && this._modes.u && (match = sub.match(/^u\{(\d+)}/))) {
} else if (profile.tokens.escunicodeub && this._modes.u && (match = sub.match(/^u\{([\da-fA-F]+)}/))) {
// unicodeu: \u{0061}
token.type = "escunicodeub";
token.l += match[0].length;
Expand Down

0 comments on commit 5f333a5

Please sign in to comment.