Skip to content

Commit e2ba386

Browse files
authored
Merge pull request #323 from ethereum/format-assembly
Fix translate.escapeString to actually replace all occurrances
2 parents 0756f57 + 188de40 commit e2ba386

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)