-
-
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
Add option to not remove whitespace - fixes #9 #17
Conversation
I came a bit further in solving this with PR #19. |
Thank you. Nice pull request! I was about to write my own word-wrapper until saw this. |
I think it is. But let me verify when I'm on my computer. It's been a while since the PR :). |
Yes |
Fixed it with the last commit. I believe this should do it. |
@SamVerschueren Sorry, you have a merge conflict after #20. |
No problem, should be fixed now. |
Awesome! Hopefully we can finally get |
Let me check that :). |
This PR tries to solve issue #9 where
wrap-ansi
removes leading and trailing whitespace by default.Although the tests succeed, and
log-update
works again as expected, I don't think it's really the expected output that we get in the tests.When I highlight the output, this is what I see
I don't think I should have those extra whitespace character (1 in green, 1 in red). I believe they should be added to the next line instead. So I will have a look at how I can solve that.
But please, feedback is more than appreciated! For instance, should we have extend the
trim
option to also acceptleading
,trailing
so that users can choose to only remove trailing or only remove leading whitespaces?log-update
for instance should have enough by only trimming the trailing whitespace.// @SBoudrias @sindresorhus @Qix- @bcoe