jsdoc-to-markdown
jsdoc-to-markdown copied to clipboard
Remove the extra "-" if the description already has it
Sometimes the method jsDoc has -
(dash) between the variable name and its description, so the generated documentation will has double dashes
For example:
/**
* Get user full name
* @param {string} firstName - First name
* @param {string} lastName - Last name
* @return {string} - Full name
*/
function getFullName(firstName, lastName) {
return firstName + ' ' + lastName;
}
The generated document will looks like:
getFullName() ⇒ string
Get user full name
Kind: global function
Returns: string
- - Full name
Param | Type | Description |
---|---|---|
firstName | string |
First name |
lastName | string |
Last name |
The issue is here Returns: string - - Full name