Skip to content

Commit

Permalink
updated to help text bug
Browse files Browse the repository at this point in the history
Signed-off-by: Pujal <pujal.gandhi@broadcom.com>
  • Loading branch information
pujal0909 committed Feb 25, 2025
1 parent c24b557 commit 8b97fdf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,9 @@ export class DefaultHelpGenerator extends AbstractHelpGenerator {
const exampleHyphen = this.mProduceMarkdown ? "" : "-";
const options = example.options.length > 0 ? ` ${example.options}` : "";
const description = this.mProduceMarkdown ? this.escapeMarkdown(example.description) : example.description;
let exampleText = exampleHyphen + " " + description + ":\n\n";
let exampleText = this.mProduceMarkdown
? "{{bullet}}" + exampleHyphen + " {{space}}" + description + ":\n\n"
: exampleHyphen + " " + description + ":\n\n";

if (this.skipTextWrap) {
exampleText = TextUtils.indentLines(exampleText, this.mProduceMarkdown ? "" : DefaultHelpGenerator.HELP_INDENT);
Expand All @@ -508,12 +510,13 @@ export class DefaultHelpGenerator extends AbstractHelpGenerator {
undefined,
this.mProduceMarkdown ? "" : DefaultHelpGenerator.HELP_INDENT);
}
console.log(exampleText);
// console.log(exampleText);
exampleText += " {{bullet}}{{space}}{{codeBegin}}$ {{space}}" +
prefix +
this.mRootCommandName + " " +
CommandUtils.getFullCommandName(this.mCommandDefinition,
this.mDefinitionTree) + options + "{{codeEnd}}\n";
console.log(exampleText);
return exampleText;
}).join("\n");
if (this.mCommandDefinition.examples.length > 0) {
Expand Down

0 comments on commit 8b97fdf

Please sign in to comment.