Added a feature to avoid linebreaks between option when displaying help#242
Added a feature to avoid linebreaks between option when displaying help#242sybaris wants to merge 1 commit intocommandlineparser:developfrom
Conversation
…lp AdditionalNewLineAfterOption
ericnewton76
left a comment
There was a problem hiding this comment.
In it's current state, you actually break the interface for HelpText.AutoBuild. You need to preserve the existing method parameters with a default ParserSettings instance.
You can always mark the older method as Obsolete if it makes sense.
| } | ||
|
|
||
| private static ParserResult<T> MakeParserResult<T>(ParserResult<T> parserResult, ParserSettings settings) | ||
| private /*static*/ ParserResult<T> MakeParserResult<T>(ParserResult<T> parserResult, ParserSettings settings) |
There was a problem hiding this comment.
It would be better to just remove the static modifier altogether. We can see the change in diffs.
| } | ||
|
|
||
| private static ParserResult<T> DisplayHelp<T>(ParserResult<T> parserResult, TextWriter helpWriter, int maxDisplayWidth) | ||
| private /*static*/ ParserResult<T> DisplayHelp<T>(ParserResult<T> parserResult, TextWriter helpWriter, int maxDisplayWidth) |
There was a problem hiding this comment.
It would be better to just remove the static modifier altogether. We can see the change in diffs.
|
|
||
| // Exercize system | ||
| var helpText = HelpText.AutoBuild(fakeResult); | ||
| var helpText = HelpText.AutoBuild(fakeResult, new ParserSettings()); |
There was a problem hiding this comment.
All of these test updates should've alerted you to the fact that you broke the existing expected interface. This will cause problems for people simply upgrading from a patch release, we'd have to make it wait until a full version release.
As noted elsewhere, you should preserve this method and make your new method an overload with the old method calling the new method with that default ParserSettings instance.
b211712 to
746885a
Compare
Hi
Linked with issue #224.
I try to make this to allow users to set option in ParserSettings to have or not linebreaks between option when displaying help.
Thanks for advance