align-text
align-text copied to clipboard
Issues with ANSI escape sequences
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.
This will be fixed in the upcoming release.