jsdoc-to-markdown icon indicating copy to clipboard operation
jsdoc-to-markdown copied to clipboard

Remove the extra "-" if the description already has it

Open LeoAref opened this issue 8 years ago • 0 comments

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

LeoAref avatar Feb 13 '17 11:02 LeoAref