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

Fix namespace paths in type autolinking #197

Closed
tmcw opened this issue Oct 19, 2015 · 5 comments · May be fixed by #1151
Closed

Fix namespace paths in type autolinking #197

tmcw opened this issue Oct 19, 2015 · 5 comments · May be fixed by #1151
Labels

Comments

@tmcw
Copy link
Member

tmcw commented Oct 19, 2015

/** Represents an HTTP response.
 *    @typedef {Object} HttpResponse
 *    @memberof request
 *    @static
 */

/** Example that doesn't work
 *    @function
 *    @param {request.HttpRequest} req - The request object
 */

Here's our current autolink code:

function autolink(paths, text) {
if (paths.indexOf(slug(text)) !== -1) {
return '<a href="#' + slug(text) + '">' + text + '</a>';
} else if (getGlobalExternalLink(text)) {
return '<a href="' + getGlobalExternalLink(text) + '">' + text + '</a>';
}
return text;
}
- this isn't getting the right paths generated.

@tmcw tmcw added the bug label Oct 19, 2015
@developit
Copy link

Thanks :)

@tmcw tmcw added this to the 3.0.0 milestone Oct 27, 2015
@tmcw
Copy link
Member Author

tmcw commented Oct 27, 2015

Depends on #189

@tmcw tmcw removed this from the 3.0.0 milestone Oct 27, 2015
@tmcw
Copy link
Member Author

tmcw commented May 5, 2016

New autolinking approach in v4 fixes this.

@tmcw tmcw closed this as completed May 5, 2016
@dmp42
Copy link

dmp42 commented Sep 20, 2016

Using documentation 4.0.0-beta10 this is not (yet) working. Should this be reopened?

@dmp42
Copy link

dmp42 commented Sep 20, 2016

Clarifying: the original example works as expected.

If you omit @static though:

  • Request is still listed as a static member of http
  • though the actual namespace for it is httpRequest (lacking dot)

To reproduce:

/**
 * @type class
 * @name http
 */

/**
 *
 * @typedef {Object} Request
 * @memberof http
 */

/**
 *
 * @typedef {Object} Request2
 * @memberof http
 * @static
 */

/**
 * @name foo
 * @type function
 * @param {http#Request} a
 * @param {http.Request} b
 * @param {httpRequest} c
 * @param {http#Request2} d
 * @param {http.Request2} e
 * @param {httpRequest2} f
 * @returns {httpRequest}
 */

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants