Skip to content
Myr

Remove trailing blanks from wrapped help text

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Christian d'Heureuse · committed by Christian d'Heureuse · parent 5083e14 · Browse files · 2 files+5 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−5 removed

  • tests:+4 added−4 removed
  • other:+1 added−1 removed

2 files+5 added−5 removed

modified:tests/helpwrap.test.js+4 added-4 removed
modified:index.js+1 added-1 removed
1427 unmodified lines
1428 return lines.map(function(line, i) {1429 if (line.slice(-1) === '\n') {1430 line = line.slice(0, line.length - 1);1431 }1432 return ((i > 0 && indent) ? Array(indent + 1).join(' ') : '') + line;1432 return ((i > 0 && indent) ? Array(indent + 1).join(' ') : '') + line.trimRight();1433 }).join('\n');1434}14351436/**
114 unmodified lines