align-text icon indicating copy to clipboard operation
align-text copied to clipboard

Issues with ANSI escape sequences

Open andywer opened this issue 7 years ago • 1 comments

Hi and thanks for the handy package! I just encountered an issue, though.

If the input contains ANSI escape sequences, the aligning won't work reliably. I encountered the issue when using center-align together with chalk.

Proposal: strip-ansi could be applied on the input line before determining its length in order to not include non-visible characters in the length.

andywer avatar Nov 08 '17 21:11 andywer

This will be fixed in the upcoming release.

jonschlinkert avatar May 12 '19 16:05 jonschlinkert