Skip to content

Commit

Permalink
replace newlines with \n, also naïvely
Browse files Browse the repository at this point in the history
  • Loading branch information
chee committed May 18, 2019
1 parent 9e575f3 commit 37d4acb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions code/stringify.js
Expand Up @@ -2,6 +2,7 @@ function escape (string) {
return string
.replace(/\\/g, '\\\\')
.replace(/"/g, '\\"')
.replace(/\n/g, '\\n')
}

module.exports = function stringify (thing) {
Expand Down

0 comments on commit 37d4acb

Please sign in to comment.