Default value quotes should not be stripped
jaydenseric opened this issue · 1 comments
jaydenseric commented
At the moment, parsing strips the quotes wrapping default values:
comment-parser/tests/parse.spec.js
Line 589 in 58aa3e2
This is problematic, because it makes it impossible to tell the difference between a string literal default value, or a namepath reference.
E.g.
/**
* The description.
* @kind constant
* @name FOO
* @type {string}
*/
const FOO = 'FOO'
/**
* @kind function
* @name bar
* @param {string} [foo=FOO] The description.
*/
function bar(foo = FOO) {}
Vs:
/**
* The description.
* @kind function
* @name bar
* @param {string} [foo='FOO'] The description.
*/
function bar(foo = 'FOO') {}
I need to be able to tell the difference in jsdoc-md
, so that for default values I can create a link around a namepath reference vs an inline code display of a string literal.
syavorsky commented
+ comment-parser@0.7.5