Skip to content

Commit

Permalink
Merge pull request #4662 from kevinushey/feature/tokenizer-unicode-regex
Browse files Browse the repository at this point in the history
allow tokenizer rules to opt-in to using unicode regexes
  • Loading branch information
nightwing committed Mar 22, 2022
2 parents 8c098ef + 73d04f1 commit 07893b9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/ace/tokenizer.js
Expand Up @@ -62,8 +62,10 @@ var Tokenizer = function(rules) {
var rule = state[i];
if (rule.defaultToken)
mapping.defaultToken = rule.defaultToken;
if (rule.caseInsensitive)
flag = "gi";
if (rule.caseInsensitive && flag.indexOf("i") === -1)
flag += "i";
if (rule.unicode && flag.indexOf("u") === -1)
flag += "u";
if (rule.regex == null)
continue;

Expand Down

0 comments on commit 07893b9

Please sign in to comment.