mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-06-20 05:48:14 +08:00
Do not truncate command table
Temporary fix for commands not showing up if they are missing a description. This is really a bug in the table rendering and should be fixed there at some point. Closes #192
This commit is contained in:

committed by
Patrik Svensson

parent
4e2251fd62
commit
241423dd16
@ -244,13 +244,13 @@ namespace Spectre.Console.Cli.Internal
|
||||
{
|
||||
grid.AddRow(
|
||||
$"[silver]<{argument.Name.EscapeMarkup()}>[/]",
|
||||
argument.Description?.TrimEnd('.') ?? string.Empty);
|
||||
argument.Description?.TrimEnd('.') ?? " ");
|
||||
}
|
||||
else
|
||||
{
|
||||
grid.AddRow(
|
||||
$"[grey][[{argument.Name.EscapeMarkup()}]][/]",
|
||||
argument.Description?.TrimEnd('.') ?? string.Empty);
|
||||
argument.Description?.TrimEnd('.') ?? " ");
|
||||
}
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ namespace Spectre.Console.Cli.Internal
|
||||
{
|
||||
grid.AddRow(
|
||||
GetOptionParts(option),
|
||||
option.Description?.TrimEnd('.') ?? string.Empty);
|
||||
option.Description?.TrimEnd('.') ?? " ");
|
||||
}
|
||||
|
||||
grid.AddEmptyRow();
|
||||
@ -370,7 +370,7 @@ namespace Spectre.Console.Cli.Internal
|
||||
|
||||
grid.AddRow(
|
||||
arguments.ToString().TrimEnd(),
|
||||
child.Description?.TrimEnd('.') ?? string.Empty);
|
||||
child.Description?.TrimEnd('.') ?? " ");
|
||||
}
|
||||
|
||||
grid.AddEmptyRow();
|
||||
|
Reference in New Issue
Block a user