word-wrap icon indicating copy to clipboard operation
word-wrap copied to clipboard

Bug: it counts ansii colour info as part of width resulting in wrong wrapping

Open emahuni opened this issue 7 years ago • 1 comments

wrap(chalk`{green this} {red is} a long string {bold to be} {yellow wrapped}`,5);

will not wrap corretly because it is including ansi color info as part of the string.

emahuni avatar Aug 23 '18 19:08 emahuni

We could employ https://www.npmjs.com/package/strip-ansi to help with this perhaps?

starpit avatar Apr 02 '21 20:04 starpit