Skip to content

Commit 188de40

Browse files
committed
Fix translate.escapeString to actually replace all occurrances (actually fix it this time)
1 parent 0756f57 commit 188de40

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')
154-
.replace(/\r/, '\\r')
155-
.replace(/\t/, '\\t');
153+
.replace(/\n/g, '\\n')
154+
.replace(/\r/g, '\\r')
155+
.replace(/\t/g, '\\t');
156156
}
157157

158158
function formatAssemblyText (asm, prefix, source) {

0 commit comments

Comments
 (0)