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

Support JSDoc @link inline tags #28624

Closed
lennylxx opened this issue Jun 13, 2017 · 3 comments
Closed

Support JSDoc @link inline tags #28624

lennylxx opened this issue Jun 13, 2017 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@lennylxx
Copy link

lennylxx commented Jun 13, 2017

  • VSCode Version: 1.14.0-insider
  • OS Version: Windows 10 OS Build 15063.296

Steps to Reproduce:

  1. Create a new file test.js with below content
$().bind();
  1. Hover your mouse on bind, it shows
    test

Notice that the link is

https://api.jquery.com/bind/#bind-eventType-eventData-handler}

There is an extra } at the end of the link.
When you click on this link, the browser will also go to this incorrect link.

  1. Open Developer Tools, you will find the the source code:
<a href="#" data-href="https://api.jquery.com/bind/#bind-eventType-eventData-handler}" title="https://api.jquery.com/bind/#bind-eventType-eventData-handler}">https://api.jquery.com/bind/#bind-eventType-eventData-handler}</a>

BTW, The definition of function bind is:

    /**
     * Attach a handler to an event for the elements.
     *
     * @param eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names.
     * @param eventData An object containing data that will be passed to the event handler.
     * @param handler A function to execute each time the event is triggered.
     * @see {@link https://api.jquery.com/bind/#bind-eventType-eventData-handler}
     */
    bind(eventType: string, eventData: any, handler: (eventObject: JQueryEventObject) => any): JQuery;

My guess is that the bug might exist here, but I'm not sure.
https://github.com/Microsoft/vscode/blob/master/src/vs/base/browser/htmlContentRenderer.ts#L130-L141

@vscodebot vscodebot bot added the insiders label Jun 13, 2017
@ramya-rao-a ramya-rao-a added the javascript JavaScript support issues label Jun 13, 2017
@mjbvz mjbvz added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Jun 13, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Jun 13, 2017

Looks like we don't understand {@link ...} inline jsdoc tags. I've opened microsoft/TypeScript#16498 to track this upstream

@mjbvz mjbvz closed this as completed Jun 13, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
@mjbvz mjbvz added this to the February 2020 milestone Jan 29, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Jan 29, 2020

Reopening since TS has improved their @link parsing. We'll take a look into support this on the VS Code side

@mjbvz mjbvz reopened this Jan 29, 2020
@mjbvz mjbvz added the feature-request Request for new features or functionality label Jan 29, 2020
@microsoft microsoft unlocked this conversation Jan 29, 2020
@mjbvz
Copy link
Collaborator

mjbvz commented Jan 29, 2020

Documentation on @link: https://jsdoc.app/tags-inline-link.html

@mjbvz mjbvz changed the title Content hover displays wrong html link Support JSDoc @link inline tags Feb 3, 2020
@mjbvz mjbvz closed this as completed in 55e72d8 Feb 3, 2020
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Feb 24, 2020
@jrieken jrieken added the verified Verification succeeded label Feb 26, 2020
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality javascript JavaScript support issues upstream Issue identified as 'upstream' component related (exists outside of VS Code) verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants