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
Thanks for looking at Textwrap and opening issues. What is your use-case for Textwrap?
When wrapping, consider skipping over escape sequences such as those used for color control.
This way colorized messages can be wrapped.
We already do this: the display_width function will unconditionally skip across such escape sequences. The function is used for all width computations in the library.
Did you run into a problem using the wrapping functions on colored terminal text?
When wrapping, consider skipping over escape sequences such as those used for color control.
This way colorized messages can be wrapped.
Maybe https://docs.rs/strip-ansi-escapes/latest/strip_ansi_escapes/ has suitable code to steal.
The text was updated successfully, but these errors were encountered: