Skip to content

Commit d3b6848

Browse files
authored
Merge pull request #318 from ethereum/asm-format-fix
Fix translate.escapeString to actually replace all occurrances
2 parents 70016bc + 63c48ab commit d3b6848

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)