escape consecutive unpaired surrogates (#2576)

fixes #2569
This commit is contained in:
Alex Lam S.L
2017-12-11 01:15:44 +08:00
committed by GitHub
parent bf000beae7
commit 93f3b2b114
3 changed files with 29 additions and 5 deletions

View File

@@ -55,3 +55,10 @@ issue_2242_4: {
}
expect_exact: 'console.log("\ud83d\ude00","\\ud83d@\\ude00");'
}
issue_2569: {
input: {
new RegExp("[\udc42-\udcaa\udd74-\udd96\ude45-\ude4f\udea3-\udecc]");
}
expect_exact: 'new RegExp("[\\udc42-\\udcaa\\udd74-\\udd96\\ude45-\\ude4f\\udea3-\\udecc]");'
}