eslint/doctrine

Support example caption

tmcw opened this issue · 2 comments

tmcw commented

According to usejsdoc's example documentation, it's valid to caption an example tag with <caption>...</caption>

/**
 * Solves equations of the form a * x = b
 * @example <caption>Example usage of method1.</caption>
 * // returns 2
 * globalNS.method1(5, 10);
 * @returns {Number} Returns the value of x for the equation.
 */

What happens if you do this now? What would you like to happen instead?

tmcw commented

Right now the <caption> tag and its content are part of the caption: the intent would be to put these in a separate part of the comment object, under a comment property, thus saving the downstream implementations from needing to parse the caption.