Skip to content

Remove trailing blanks from wrapped help text - #1096

Merged
abetomo merged 1 commit into
tj:developfrom
chdh:chdh/helpFix
Nov 15, 2019
Merged

Remove trailing blanks from wrapped help text#1096
abetomo merged 1 commit into
tj:developfrom
chdh:chdh/helpFix

Conversation

@chdh

@chdh chdh commented Nov 14, 2019

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

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

@shadowspawn shadowspawn left a comment

Copy link
Copy Markdown
Collaborator

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

@abetomo abetomo left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
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.

3 participants