-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Conditionally trim trailing periods of argument and option descriptions #1740
base: main
Are you sure you want to change the base?
Conditionally trim trailing periods of argument and option descriptions #1740
Conversation
Changed the Should_Not_Trim_Description_Trailing_Period test case to output help with descriptions for command, argument, and option.
@microsoft-github-policy-service agree |
Thanks, I'll try to review this one over the weekend. |
Hello @TheTonttu, thank you for the contribution. My brain isn't fully functional today, however it looks like there is one more change required in this PR. Take one of the expectations, say I believe this line needs normalising too: Can you please check and see if you concur? If so, make the change and repush. |
PS. @TheTonttu I plan to review/merge this #1717 soon, so if it's before your next push, you'll need to rebase and update accordingly. |
Good catch, I'll make an update soon™. |
The change affected quite many test cases. |
It looks ok to me, /// <summary>
/// Gets or sets a value indicating whether a trailing period of a command description is trimmed in the help text.
/// </summary>
bool TrimTrailingPeriod { get; set; } Prior to your PR, the actual command description wouldn't ever be trimmed! I just want to triple check with one of our other maintainers over the weekend first... |
Note to self: The more I think about the idea of The trim only ever happens on text entered by the Spectre.Console application developer, and it's compile time text rather than dynamic somehow (ie. it's known in advance) - so why on earth do we have a property to offer to trim their explicitly entered text? If they want it trimmed, then simply don't use a period at the end. Furthermore, the trim is defaulting to I think I'm in favour of marking the property as obsolete and also changing its default to |
fixes #1729
Changes
HelpProvider.TrimTrailingPeriod
property affects trailing period of argument and option descriptions in addition to command descriptions.Please upvote 👍 this pull request if you are interested in it.