mirror of
https://github.com/debug-js/debug.git
synced 2026-01-25 16:42:28 +00:00
remove ReDoS regexp in %o formatter (#504)
This commit is contained in:
parent
52e1f21284
commit
f53962e944
@ -85,7 +85,9 @@ function useColors() {
|
||||
exports.formatters.o = function(v) {
|
||||
this.inspectOpts.colors = this.useColors;
|
||||
return util.inspect(v, this.inspectOpts)
|
||||
.replace(/\s*\n\s*/g, ' ');
|
||||
.split('\n').map(function(str) {
|
||||
return str.trim()
|
||||
}).join(' ');
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user