Skip to content

Commit

Permalink
Remove duplicate brackets from array default values
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig committed Feb 13, 2024
1 parent d0707c0 commit d7524ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/cli/docsgen/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ function renderOption(optionName: string, option: CliOptionDefinition): string |
if (!defaultValue.includes(`"`)) {
defaultValue = `"${defaultValue}"`;
}
defaultValue = `[ ${defaultValue} ]`;
if (!defaultValue.startsWith("[")) {
defaultValue = `[ ${defaultValue} ]`;
}
}
commandOption.push(`default: \`${defaultValue}\``);
}
Expand Down

0 comments on commit d7524ce

Please sign in to comment.