Skip to content

Commit

Permalink
use stringLength method
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jan 3, 2014
1 parent 786ce56 commit e0b4f73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stylish.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ module.exports = {
prevfile = el.file;

return line;
})).split('\n').map(function (el, i) {
}), {
stringLength: function (str) {
return chalk.stripColor(str).length;
}
}).split('\n').map(function (el, i) {
return headers[i] ? '\n' + chalk.underline(headers[i]) + '\n' + el : el;
}).join('\n') + '\n\n';

Expand Down

0 comments on commit e0b4f73

Please sign in to comment.