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

Added template functions for multi-line Description formatting. #1175

Conversation

@imle
Copy link
Contributor

@imle imle commented Aug 17, 2020

Added functions to template system for consistent multi-line Description formatting.

What type of PR is this?

  • bug
  • cleanup
  • documentation
  • feature

What this PR does / why we need it:

Formatting for multi-line descriptions indents the first line of the description but none of the consecutive lines. This adds functions to the templating that adjusts multi-line printing to automatically add the 3 spaces to every line while maintaining the user defined spacing.

Which issue(s) this PR fixes:

No current issue is open for this.

Testing

Included a test to verify the expected output.

Release Notes

The default help text now indents all lines in a App and Command's Description field.
@imle imle requested a review from urfave/cli as a code owner Aug 17, 2020
@imle imle requested review from rliebz and lynncyrin and removed request for urfave/cli Aug 17, 2020
@imle
Copy link
Contributor Author

@imle imle commented Sep 29, 2020

Any reason this cannot be merged?

@imle
Copy link
Contributor Author

@imle imle commented Oct 27, 2020

@rliebz or @lynncyrin is there a reason this cannot be merged?

@lynncyrin
Copy link
Member

@lynncyrin lynncyrin commented Oct 27, 2020

I can give this a look later probably, but I have a heavy workload right now so it may slip

@rliebz
rliebz approved these changes Oct 31, 2020
@rliebz
Copy link
Member

@rliebz rliebz commented Oct 31, 2020

Sorry for the delay here, this is a huge improvement!

Copy link
Member

@asahasrabuddhe asahasrabuddhe left a comment

I agree, this is a wonderful addition. Thanks!

@asahasrabuddhe asahasrabuddhe merged commit 09ac54c into urfave:master Nov 1, 2020
12 checks passed
12 checks passed
ubuntu-latest @ Go 1.12
Details
ubuntu-latest @ Go 1.13
Details
ubuntu-latest @ Go 1.14
Details
macos-latest @ Go 1.12
Details
macos-latest @ Go 1.13
Details
macos-latest @ Go 1.14
Details
windows-latest @ Go 1.12
Details
windows-latest @ Go 1.13
Details
windows-latest @ Go 1.14
Details
test-docs
Details
codecov/patch 100.00% of diff hit (target 73.37%)
Details
codecov/project 73.45% (+0.08%) compared to d2d2098
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants