From fef319ee526146dc2538edbcd1b3921f68f454cd Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Thu, 14 Nov 2024 14:36:53 -0600 Subject: [PATCH] fix whitespace....again.... --- src/hwylterm/hwylcli.nim | 10 ++++++---- tests/example.nim | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/hwylterm/hwylcli.nim b/src/hwylterm/hwylcli.nim index 6c2633d..b91b5a7 100644 --- a/src/hwylterm/hwylcli.nim +++ b/src/hwylterm/hwylcli.nim @@ -104,22 +104,24 @@ func render*(cli: HwylCliHelp, subcmd: HwylSubCmdHelp): string = func render*(cli: HwylCliHelp): string = if cli.header != "": result.add cli.header - if cli.usage != "": result.add "\n\n" + if cli.usage != "": result.add "[" & cli.styles.header & "]" result.add "usage[/]:\n" result.add indent(cli.usage, 2 ) + result.add "\n" if cli.description != "": - result.add "\n\n" + result.add "\n" result.add cli.description + result.add "\n" if cli.subcmds.len > 0: - result.add "\n\n" + result.add "\n" result.add "[" & cli.styles.header & "]" result.add "subcommands[/]:\n" for s in cli.subcmds: result.add cli.render(s) + result.add "\n" if cli.flags.len > 0: - result.add "\n\n" result.add "[" & cli.styles.header & "]" result.add "flags[/]:\n" for f in cli.flags: diff --git a/tests/example.nim b/tests/example.nim index 9da1971..0afa866 100644 --- a/tests/example.nim +++ b/tests/example.nim @@ -33,7 +33,8 @@ hwylCli: echo fmt"{yes=}, {color=}" subcommands: [one] - ... """ + help: + description """ the first subcommand this command features both an enum flag and a Count flag