Crash for parameter with type and link and parentheses #129

Closed
andy-hanson opened this Issue Oct 20, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@andy-hanson

Probably related to #119.

I'm documenting this code:

/** @param {boolean} x A parameter (where {@link foo} is its function). */
export function foo(x) {}

And I get this error:

SyntaxError: Invalid regular expression: /[~]\boolean} x A parameter (where {@link foo$/: Unterminated group
    at RegExp (native)
    at new RegExp (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/node_modules/core-js/modules/es6.regexp.js:22:11)
    at IdentifiersDocBuilder._findByName (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:140:20)
    at IdentifiersDocBuilder._buildDocLinkHTML (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:996:22)
    at IdentifiersDocBuilder._buildTypeDocLinkHTML (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:972:21)
    at IdentifiersDocBuilder._buildSignatureHTML (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:1105:33)
    at /home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:498:38
    at IceCap.loop (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/node_modules/ice-cap/out/src/IceCap.js:319:15)
    at IdentifiersDocBuilder._buildSummaryDoc (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:495:11)
    at IdentifiersDocBuilder._buildSummaryHTML (/home/andy/.nvm/versions/node/v4.2.1/lib/node_modules/esdoc/out/src/Publisher/Builder/DocBuilder.js:454:29)

The problem goes away if I remove any one of the type or the link or the parentheses.

@h13i32maru

This comment has been minimized.

Show comment
Hide comment
@h13i32maru

h13i32maru Oct 25, 2015

Member

@andy-hanson This is ESDoc bug. Thanks.

Member

h13i32maru commented Oct 25, 2015

@andy-hanson This is ESDoc bug. Thanks.

@h13i32maru

This comment has been minimized.

Show comment
Hide comment
@h13i32maru

h13i32maru Nov 1, 2015

Member

I fixed this issue at v0.4.2.

Member

h13i32maru commented Nov 1, 2015

I fixed this issue at v0.4.2.

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