-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove trailing blanks from wrapped help text #1096
Conversation
I'll do some testing, but looks sensible, and I like that it removes (invisible) trailing spaces from the unit tests. |
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.
LGTM
(My terminal does not show the wrapping problem before the fix, but I think it is allowing an extra character so I missed the problem. I like removing the invisible character so WYSIWYG.)
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.
👍
4.1 has shipped, thanks @chdh |
Pull Request
Problem
Auto-wrapped lines in the generated help text have an extra space character at the end. This leads to unwanted empty lines in the help text display at the console, when a resulting line is exactly 80 characters long.
The trailing space characters can be seen in the changes of this PR for tests/helpwrap.test.js.
Solution
A trimRight() is added in wrap().