Skip to content

Commit 4e21502

Browse files
committed
fix regression
1 parent a7a17c9 commit 4e21502

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/node.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ var formatters = module.exports.formatters;
160160

161161
formatters.o = function (v) {
162162
this.inspectOpts.colors = this.useColors;
163-
return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
163+
return util.inspect(v, this.inspectOpts)
164+
.split('\n')
165+
.map(function (str) { return str.trim(); })
166+
.join(' ');
164167
};
165168
/**
166169
* Map %O to `util.inspect()`, allowing multiple lines if needed.

0 commit comments

Comments
 (0)