Skip to content

Commit db76033

Browse files
committed
Remove unsightly blank lines in --help output
Fixes #244.
1 parent 72f3856 commit db76033

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CommandLine/Text/MultiLineTextAttribute.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public string Line5
150150
internal HelpText AddToHelpText(HelpText helpText, Func<string, HelpText> func)
151151
{
152152
var strArray = new[] { line1, line2, line3, line4, line5 };
153-
return strArray.Aggregate(helpText, (current, line) => func(line));
153+
return strArray.Take(GetLastLineWithText(strArray)).Aggregate(helpText, (current, line) => func(line));
154154
}
155155

156156
internal HelpText AddToHelpText(HelpText helpText, bool before)

0 commit comments

Comments
 (0)