`@param` parser fails when braces appear in description. #185

Closed
rhys-vdw opened this Issue Nov 27, 2015 · 3 comments

Comments

Projects
None yet
2 participants
@rhys-vdw

Just trying out esdoc for the first time. I'm getting errors everywhere I'm using unions in parens. This is supported syntax according to docs.

   * @param {?(Object|function)} initializer
   *  An initializer callback, taking the Options instance as its first
   *  argument. Alternatively an object of {[method]: argument} pairs to be
   *  invoked.
/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/ClassDocBuilder.js:79
            throw _iteratorError;
                  ^
SyntaxError: Invalid regular expression: /[~]\function)} initializer
 An initializer callback, taking the Options instance as its first
 argument. Alternatively an object of {[method]: argument$/: Unmatched ')'
    at RegExp (native)
    at new RegExp (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/node_modules/core-js/modules/es6.regexp.js:22:76)
    at ClassDocBuilder._findByName (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:140:20)
    at ClassDocBuilder._buildDocLinkHTML (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:1032:22)
    at ClassDocBuilder._buildTypeDocLinkHTML (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:1008:21)
    at ClassDocBuilder._buildSignatureHTML (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:1141:33)
    at /Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:500:38
    at IceCap.loop (/Users/rhys/Projects/atlas/data-mapper/node_modules/ice-cap/out/src/IceCap.js:319:15)
    at ClassDocBuilder._buildSummaryDoc (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:497:11)
    at ClassDocBuilder._buildSummaryHTML (/Users/rhys/Projects/atlas/data-mapper/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:456:29)
npm ls | grep esdoc
├─┬ esdoc@0.4.3
├─┬ esdoc-es7-plugin@0.0.3
@rhys-vdw

This comment has been minimized.

Show comment
Hide comment
@rhys-vdw

rhys-vdw Nov 27, 2015

Seems this was caused by having "{ ... }" in the description. If I wrap it in backticks it works as intended.

   * @param {?(Object|function)} initializer
   *   An initializer callback, taking the Options instance as its first
   *   argument. Alternatively an object of `{[method]: argument}` pairs to be
   *   invoked.

Seems this was caused by having "{ ... }" in the description. If I wrap it in backticks it works as intended.

   * @param {?(Object|function)} initializer
   *   An initializer callback, taking the Options instance as its first
   *   argument. Alternatively an object of `{[method]: argument}` pairs to be
   *   invoked.

@rhys-vdw rhys-vdw changed the title from Nullable union fails to `@param` parser fails when braces appear in description. Nov 27, 2015

h13i32maru added a commit that referenced this issue Feb 11, 2016

@h13i32maru

This comment has been minimized.

Show comment
Hide comment
@h13i32maru

h13i32maru Feb 11, 2016

Member

Thanks for reporting this issue. I fixed this issue on master.

Member

h13i32maru commented Feb 11, 2016

Thanks for reporting this issue. I fixed this issue on master.

@h13i32maru

This comment has been minimized.

Show comment
Hide comment
@h13i32maru

h13i32maru Feb 14, 2016

Member

I released v0.4.5 that fixed this issue.

Member

h13i32maru commented Feb 14, 2016

I released v0.4.5 that fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment