modify regex object instead of creating a new literal
This commit is contained in:
parent
8f4a3f77a0
commit
cc094efe1b
@ -10,6 +10,5 @@ exports.Literal = function (node) {
|
||||
if (!_.contains(regex.flags, "u")) return;
|
||||
_.pull(flags, "u");
|
||||
|
||||
var pattern = rewritePattern(regex.pattern, regex.flags);
|
||||
return b.literal(new RegExp(pattern, flags.join("")));
|
||||
regex.pattern = rewritePattern(regex.pattern, regex.flags);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user