Merge branch '2.3' into 2.4

This commit is contained in:
Markus Mäkelä
2019-07-19 12:25:26 +03:00
5 changed files with 73 additions and 98 deletions

View File

@ -142,6 +142,9 @@ module.exports = function() {
if (this.argv.tsv) {
// Based on the regex found in: https://github.com/jonschlinkert/strip-color
str = str.replace( /\x1B\[[(?);]{0,2}(;?\d)*./g, '')
// Trim trailing whitespace that cli-table generates
str = str.split(os.EOL).map(s => s.split('\t').map(s => s.trimEnd()).join('\t')).join(os.EOL)
}
return str
}