clenemt / docdash

:zap: Lodash inspired JSDoc 3 template/theme
http://clenemt.github.io/docdash/
Other
824 stars 201 forks source link

Support usage of {@link url text} in @listens, et al #93

Closed nalexander50 closed 2 years ago

nalexander50 commented 3 years ago

Currently, if you add an @link tag for @listens, the URL gets broken by the insertion of a random event:. I looked through the codebase and couldn't figure out where event: was coming from. The only way I've found to fix it is to add a .replace('event:', '') to the method.tmpl file.

JavaScript

/**
* @listens {@link https://developer.mozilla.org/en-US/docs/Web/API/Element/contextmenu_event context-menu}
*/

HTML

<a href="https://developer.mozilla.event:org/en-US/docs/Web/API/Element/contextmenu_event">context-menu</a>

Notice that the domain has become Mozilla.event:org which is obviously invalid.

My assumption (although not verified) is that this problem is likely to exist in other places as well, such as @fires. Other than the broken URL, the remainder of the HTML is perfectly fine.

ar2rsawseen commented 2 years ago

I think we already receive parsed data from taffy like this, so it should be fixed on jsdoc side, I would recommend to open issue with them