Skip to content

Commit

Permalink
Bugfix Regex's containing (\0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Nov 23, 2017
1 parent 04e4679 commit bb91fc7
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ function createRegExpLiteral(args, prettify, t) {
.replace(/\f/g, "\\f")
.replace(/\r/g, "\\r");
}

pattern = pattern.replace(/\0/g, "\\0");

return t.regExpLiteral(pattern, flags);
}

Expand Down

0 comments on commit bb91fc7

Please sign in to comment.