chalk / wrap-ansi

Wordwrap a string with ANSI escape codes
MIT License
120 stars 25 forks source link

Tabs are not wrapped correctly #54

Open Maxim-Mazurok opened 6 months ago

Maxim-Mazurok commented 6 months ago

Here's a reproduction:

const wrapAnsi = require('wrap-ansi');

const styledString = '\t\t\t\ttestingtesting';

console.log('1234556790');
console.log(wrapAnsi(styledString, 10, { hard: true, trim: false }));

This is what I get:

1234556790
                                testingtes
ting

This is what I expect:

1234556790

  testingtes
ting