Skip to content
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

Merged
merged 1 commit into from Nov 15, 2019
Merged

Remove trailing blanks from wrapped help text #1096

merged 1 commit into from Nov 15, 2019

Conversation

chdh
Copy link
Contributor

@chdh chdh commented Nov 14, 2019

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().

@shadowspawn
Copy link
Collaborator

I'll do some testing, but looks sensible, and I like that it removes (invisible) trailing spaces from the unit tests.

Copy link
Collaborator

@shadowspawn shadowspawn left a 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.)

Copy link
Collaborator

@abetomo abetomo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@abetomo abetomo merged commit f7778ce into tj:develop Nov 15, 2019
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Nov 15, 2019
@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label Jan 6, 2020
@shadowspawn
Copy link
Collaborator

4.1 has shipped, thanks @chdh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants