Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ function formatArgs(args) {
const c = this.color;
const colorCode = '\u001B[3' + (c < 8 ? c : '8;5;' + c);
const prefix = ` ${colorCode};1m${name} \u001B[0m`;

args[0] = prefix + args[0].split('\n').join('\n' + prefix);
args.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\u001B[0m');
// Append the +ms suffix to the format string instead of pushing a trailing
// argument. A separate arg is consumed by unused printf tokens (e.g. lone
// `%s`), which made the duration replace the missing value (#967).
const suffix = ` ${colorCode}m+` + module.exports.humanize(this.diff) + '\u001B[0m';
args[0] = prefix + args[0].split('\n').join('\n' + prefix) + suffix;
} else {
args[0] = getDate() + name + ' ' + args[0];
}
Expand Down