Skip to content

Commit aaf81b1

Browse files
committed
Don't escape regular whitespace characters.
1 parent ecf1830 commit aaf81b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cli.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function parse (source) {
9090
}
9191
}
9292

93-
return JSON.stringify(parsed, null, options.indent).replace(/[^\x20-\x7e]/g, function(char) {
93+
return JSON.stringify(parsed, null, options.indent).replace(/[^\n\r\ \x20-\x7e]/g, function(char) {
9494
return '\\u' + ('0000' + Number(char.charCodeAt(0)).toString(16)).match(/....$/)[0];
9595
});
9696
} catch (e) {

0 commit comments

Comments
 (0)