Skip to content

Commit

Permalink
Improve format for partial argument descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn committed May 21, 2021
1 parent d74473b commit 05ddc17
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,11 @@ class Help {
extraInfo.push(`default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`);
}
if (extraInfo.length > 0) {
return `${argument.description} (${extraInfo.join(', ')})`;
const extraDescripton = `(${extraInfo.join(', ')})`;
if (argument.description) {
return `${argument.description} ${extraDescripton}`;
}
return extraDescripton;
}
return argument.description;
}
Expand Down

0 comments on commit 05ddc17

Please sign in to comment.