-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of invisible sequences in trim mode #33
Conversation
I merged #32, can you rebase and remove the |
@sindresorhus I've just realized another question - should strings be wrapped before or after trimming? Currently wrapping is done before trimming which produces the following results: // 3 spaces before / between / after
t.is(wrapAnsi(' foo bar ', 6), 'foo\nbar');
t.is(wrapAnsi(' foo bar ', 3), '\nfoo\n\nbar\n'); |
@coreyfarrell @sindresorhus It's not a question of trim first or not(trimming is not just a stage), it's a bug, and I guess part of it was introduced by my big patch. Anyhow, added test, fixed. |
@stroncium I just verified that all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, I've also verified the latest version allows cliui tests to pass.
Thanks for fixing, @stroncium 👍 |
Added tests from #32 and fixed code to pass them.