Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash for parameter with type and link and parentheses #129

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

Crash for parameter with type and link and parentheses #129

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

Comments

@andy-hanson
Copy link

@andy-hanson andy-hanson commented Oct 20, 2015

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
Copy link
Member

@h13i32maru h13i32maru commented Oct 25, 2015

@andy-hanson This is ESDoc bug. Thanks.

h13i32maru added a commit that referenced this issue Nov 1, 2015
@h13i32maru
Copy link
Member

@h13i32maru 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.