Skip to content

Commit

Permalink
fix regression
Browse files Browse the repository at this point in the history
  • Loading branch information
Qix- committed Nov 19, 2020
1 parent a7a17c9 commit 4e21502
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node.js
Expand Up @@ -160,7 +160,10 @@ var formatters = module.exports.formatters;

formatters.o = function (v) {
this.inspectOpts.colors = this.useColors;
return util.inspect(v, this.inspectOpts).replace(/\s*\n\s*/g, ' ');
return util.inspect(v, this.inspectOpts)
.split('\n')
.map(function (str) { return str.trim(); })
.join(' ');
};
/**
* Map %O to `util.inspect()`, allowing multiple lines if needed.
Expand Down

0 comments on commit 4e21502

Please sign in to comment.