From b0f1942b8a60a7f4e12907e852a940b3785ff263 Mon Sep 17 00:00:00 2001 From: KnorpelSenf Date: Mon, 16 Sep 2024 23:09:34 +0200 Subject: [PATCH] fix(command): directly print example text w/o capitalization (#741) Co-authored-by: Steffen Trog --- command/help/_help_generator.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/command/help/_help_generator.ts b/command/help/_help_generator.ts index 3cdff558..0de96c2b 100644 --- a/command/help/_help_generator.ts +++ b/command/help/_help_generator.ts @@ -293,7 +293,7 @@ export class HelpGenerator { } return this.label("Examples") + Table.from(examples.map((example: Example) => [ - dim(bold(`${capitalize(example.name)}:`)), + dim(bold(example.name)), dedent(example.description), ])) .padding(1) @@ -358,10 +358,6 @@ export class HelpGenerator { } } -function capitalize(string: string): string { - return string.charAt(0).toUpperCase() + string.slice(1); -} - /** * Colorize arguments string. * @param argsDefinition Arguments definition: ` `