diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-05-17 20:10:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-17 20:10:50 +0800 |
commit | 569c21e952c99340db73d6ad1c7102500cc1b341 (patch) | |
tree | 1ca43da653f8640cd3aac12d2a34822dfef310b8 /test/compress/string-literal.js | |
parent | 87c3a2c0ce2cfd86011d13688080a29520bb3c7f (diff) | |
download | tracifyjs-569c21e952c99340db73d6ad1c7102500cc1b341.tar.gz tracifyjs-569c21e952c99340db73d6ad1c7102500cc1b341.zip |
improve `RegExp` handling (#1959)
- remove `options.output.unescape_regexps`
- preserve original pattern whenever possible
fixes #54
fixes #1929
Diffstat (limited to 'test/compress/string-literal.js')
-rw-r--r-- | test/compress/string-literal.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/compress/string-literal.js b/test/compress/string-literal.js index 8b93961c..1138fed8 100644 --- a/test/compress/string-literal.js +++ b/test/compress/string-literal.js @@ -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(/[\\\\/]/)}" +} |