improve RegExp handling (#1959)

- remove `options.output.unescape_regexps`
- preserve original pattern whenever possible

fixes #54
fixes #1929
This commit is contained in:
Alex Lam S.L
2017-05-17 20:10:50 +08:00
committed by GitHub
parent 87c3a2c0ce
commit 569c21e952
3 changed files with 23 additions and 44 deletions

View File

@@ -8,3 +8,12 @@ octal_escape_sequence: {
var border_check = "\x20\x30\x38\x30\x00\x30\xc0\x30";
}
}
issue_1929: {
input: {
function f(s) {
return s.split(/[\\/]/);
}
}
expect_exact: "function f(s){return s.split(/[\\\\/]/)}"
}