Skip to content

Commit 18ec8c1

Browse files
committed
CommandLineParser: word-wrap the section headings in the help screen
1 parent 90ef25f commit 18ec8c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Src/CommandLineParser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ private static Func<int, ConsoleColoredString> getHelpGenerator(Type type, Func<
670670
{
671671
for (var i = 0; i < fmtOpt.BlankLinesBeforeSection; i++)
672672
helpString.Add(ConsoleColoredString.NewLine);
673-
helpString.Add(heading);
673+
helpString.Add(heading.WordWrap(wrapWidth).JoinColoredString(Environment.NewLine));
674674
for (var i = -1; i < fmtOpt.BlankLinesAfterSection; i++)
675675
helpString.Add(ConsoleColoredString.NewLine);
676676
table.RemoveEmptyColumns();

0 commit comments

Comments
 (0)