jsdoc2md / dmd

The default output template for jsdoc2md
MIT License
39 stars 49 forks source link

Add typeLinks helper and wrap link inside linked-type-list.hbs #51

Closed plasticrake closed 4 years ago

plasticrake commented 7 years ago

I took a stab at implementing this: jsdoc2md/jsdoc-to-markdown#138

I have almost no experience with handlebars besides what I had to learn to implement this. So I'm not sure if I did it in the right place. I tried to wrap the existing code instead of modifying.

Currently For: Name.<Name2> only Name2will become a link

Will create links for the following formats (each Name will be a link): Name.<Name2> Name.<Name2, Name3> Name.<Name2, Name3, Name4>...etc

75lb commented 6 years ago

hi, sorry for the slow response! Thanks for this patch, will get round to testing it asap. Are you using it locally?

plasticrake commented 6 years ago

Yes! I have been using this locally.

75lb commented 6 years ago

Unfortunately this breaks some cases. Please fix the PR so this code:

/**
 * @type {module:cjs/human[]}
 */
var returnsArrayOfType

/**
 * @type {?module:cjs/human[]}
 */
var returnsArrayOfType2

...returns this markup, as it did before this PR:

<a name="returnsArrayOfType"></a>

## returnsArrayOfType : <code>Array.&lt;module:cjs/human&gt;</code>
**Kind**: global variable  
<a name="returnsArrayOfType2"></a>

## returnsArrayOfType2 : <code>Array.&lt;module:cjs/human&gt;</code>
**Kind**: global variable  
75lb commented 4 years ago

Closing as stale and incomplete