Add a bit of extra spacing if group description is provided.

See #135.
This commit is contained in:
Alec Thomas
2021-02-09 15:17:29 +11:00
parent 7e27c8ecf5
commit 294d1d1717
2 changed files with 14 additions and 4 deletions
+8 -4
View File
@@ -148,10 +148,12 @@ func printNodeDetail(w *helpWriter, node *Node, hide bool) {
for _, group := range groupedFlags {
w.Print("")
if group.Metadata.Title != "" {
w.Print(group.Metadata.Title)
w.Wrap(group.Metadata.Title)
}
if group.Metadata.Description != "" {
w.Print(group.Metadata.Description)
w.Print("")
w.Wrap(group.Metadata.Description)
w.Print("")
}
writeFlags(w.Indent(), group.Flags)
}
@@ -168,10 +170,12 @@ func printNodeDetail(w *helpWriter, node *Node, hide bool) {
for _, group := range groupedCmds {
w.Print("")
if group.Metadata.Title != "" {
w.Print(group.Metadata.Title)
w.Wrap(group.Metadata.Title)
}
if group.Metadata.Description != "" {
w.Print(group.Metadata.Description)
w.Print("")
w.Wrap(group.Metadata.Description)
w.Print("")
}
if w.Compact {