Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit b0691ea

Browse files
committed
Don't print optionArg definitions
1 parent 70900e4 commit b0691ea

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/subcommands/explain/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export default class Explain extends CLI {
5151
const parsedAST = JSON.parse(ast);
5252
const tree = new Tree(parsedAST);
5353
const parsedDefinitions: NodeDefinition[] = JSON.parse(definitions);
54+
5455
const highlight = new Highlight<string>(this.decorators, "cli");
5556
const decoratedNodes = highlight.source(trimmedSource, tree, parsedDefinitions);
5657
const decoratedString = decoratedNodes.join("");
@@ -67,6 +68,7 @@ export default class Explain extends CLI {
6768
}
6869

6970
for (const def of parsedDefinitions) {
71+
if (def.type === "optionArg") continue;
7072
const [header, summary] = this.decorators.createDefinition(def);
7173
Print.text(header, 4);
7274
Print.text(summary, 6);

0 commit comments

Comments
 (0)