[ES6] fix template string escaping of \${...}

This commit is contained in:
kzc
2016-09-21 08:39:29 -04:00
committed by Richard van Velzen
parent 4198095a9c
commit 88f6ff38d1
2 changed files with 13 additions and 1 deletions

View File

@@ -409,7 +409,7 @@ function OutputStream(options) {
print(encoded);
},
print_template_string_chars: function(str) {
var encoded = encode_string(str, '`');
var encoded = encode_string(str, '`').replace(/\${/g, "\\${");
return print(encoded.substr(1, encoded.length - 2));
},
encode_string : encode_string,