Skip to content

Commit 63c48ab

Browse files
committed
Fix translate.escapeString to actually replace all occurrances
1 parent 70016bc commit 63c48ab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

translate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ function translateJsonCompilerOutput (output, libraries) {
150150

151151
function escapeString (text) {
152152
return text
153-
.replace('\n', '\\n', 'g')
154-
.replace('\r', '\\r', 'g')
155-
.replace('\t', '\\t', 'g');
153+
.replace(/\n/, '\\n')
154+
.replace(/\r/, '\\r')
155+
.replace(/\t/, '\\t');
156156
}
157157

158158
function formatAssemblyText (asm, prefix, source) {

0 commit comments

Comments
 (0)