hideCommandSummaryInDescription removes description when missing a line feed #1243
Labels
--help output
Related to --help output
bug
Something isn't working
good first issue
Good for newcomers
help wanted
Accepting PRs
Describe the bug
When using the
hideCommandSummaryInDescription
option ofHelpOptions
, if the command description doesn't start with a line feed, then the description is lost in the output.To Reproduce
Expected behavior
Actual behavior
Environment:
Additional context
The problem comes from this line.
The usage of
slice
here is dropping the description if it doesn't start with a newline character.I believe this behavior is here to support situations like this:
Although, I'd argue that's an end-user problem. One that's easily fixed with
trim
:Alternatively,
oclif
could calltrim
instead of slice, but that's making assumptions about end-user's descriptions.The text was updated successfully, but these errors were encountered: