chalk/wrap-ansi

Space at new lines

grigorii-horos opened this issue · 1 comments

wrapAnsi('Long line. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed efficitur sapien et volutpat molestie. Curabitur facilisis rutrum luctus. Ut nec justo dui.',80,{trim:false})

This will split strint to

'Long line. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed \n' +
'efficitur sapien et volutpat molestie. Curabitur facilisis rutrum luctus. Ut nec\n' +
' justo dui.' // <- You can see here a space before

I think that need option to do not move space at next line.

It doesn't seem like you need {trim: false} for the above example. Can you elaborate on a real use-case where you need {trim: false} and also not having spaces moved to next line?


I think that need option to do not move space at next line.

Keep in mind that there's a high bar to add new options. We prefer to fix the defaults instead if possible.