You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@timoxley : when wcwidth(str)===1, (like with chalk.gray('.')) droping the slice(0,len) solves it (relevant line), but when wcwidth(str)>1 it's not always possible to multiply it several times to get the required length, and it is required to trim the last occurrence. Any idea how to properly trim such a string?
i.e. How can I slice the first two visual chars of chalk.gray('123') without messing the colors?
That would enable slicing out the actual wanted length, but is there any reasonable way to colour it again before concatenating to the padding?
I'm starting to think that there is no way to do this, meaning we should disallow wcwidth(padding) > 1, wcwidth(padding) !== padding.length), or preferably, the combination of the two.
For instance,
{ paddingChr: chalk.gray('.') }
will break format.Problem is within utils.js::repeatString which uses slice.
The text was updated successfully, but these errors were encountered: