diff options
author | startswithaj <jake.mc@icloud.com> | 2015-10-15 16:50:53 +1000 |
---|---|---|
committer | startswithaj <jake.mc@icloud.com> | 2015-10-15 17:42:16 +1000 |
commit | 6b2861e0861968f1f7acae5cf964cc0e6244b0be (patch) | |
tree | 3026584b6f337b1a8eeb1f6b9c0a0a36fcbddc92 /lib | |
parent | d5138f74677012b301636cad6d218486e53265e2 (diff) | |
download | tracifyjs-6b2861e0861968f1f7acae5cf964cc0e6244b0be.tar.gz tracifyjs-6b2861e0861968f1f7acae5cf964cc0e6244b0be.zip |
Make_string was missing \v and wasnt reversing vertical tabs even though read_escaped_char coverts them
Diffstat (limited to 'lib')
-rw-r--r-- | lib/output.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/output.js b/lib/output.js index a3b8f1a7..933a4ce7 100644 --- a/lib/output.js +++ b/lib/output.js @@ -88,13 +88,14 @@ function OutputStream(options) { function make_string(str, quote) { var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s){ + str = str.replace(/[\\\b\f\n\r\v\t\x22\x27\u2028\u2029\0\ufeff]/g, function(s){ switch (s) { case "\\": return "\\\\"; case "\b": return "\\b"; case "\f": return "\\f"; case "\n": return "\\n"; case "\r": return "\\r"; + case "\v": return "\\v"; case "\u2028": return "\\u2028"; case "\u2029": return "\\u2029"; case '"': ++dq; return '"'; |