Skip to content

Commit

Permalink
Fix trailing color in new lines
Browse files Browse the repository at this point in the history
When the output is constructed, new lines are included in the colored string.

<img src="http://i.imgur.com/DthTZXz.png">

<img src="http://i.imgur.com/nsiFALg.png">
  • Loading branch information
eladchen authored and royriojas committed Mar 23, 2018
1 parent f1946c8 commit 414db03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ var getKeyLink = function(key) {
};

var printSummary = function(hash, title, method) {
var res = '\n\n' + chalk[method](title + ':\n');
var res = '\n\n' + chalk[method](title + ':') + chalk.white('\n');
res += table(
Object.keys(hash).sort(function(a, b) {
return hash[a] > hash[b] ? -1 : 1;
Expand Down Expand Up @@ -232,8 +232,8 @@ module.exports = function(results) {
', ',
warnings,
pluralize(' warning', warnings),
')\n'
].join(''));
')'
].join('')) + chalk.white('\n');

if (errors > 0) {
output += printSummary(errorsHash, 'Errors', 'red');
Expand Down

0 comments on commit 414db03

Please sign in to comment.