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

JSDoc {@link} support all 4 types of links #55737

Closed
vanowm opened this issue Sep 13, 2023 · 2 comments · Fixed by #56244
Closed

JSDoc {@link} support all 4 types of links #55737

vanowm opened this issue Sep 13, 2023 · 2 comments · Fixed by #56244
Labels
Experience Enhancement Noncontroversial enhancements Help Wanted You can do this Suggestion An idea for TypeScript
Milestone

Comments

@vanowm
Copy link

vanowm commented Sep 13, 2023

According to JSDocs documentation {@link} may be formatted 4 different ways:

{@link namepathOrURL}
[link text]{@link namepathOrURL}
{@link namepathOrURL|link text}
{@link namepathOrURL link text (after the first space)}

VSCode currently only supports first and last formats:
image

The third format ({@link namepathOrURL|link text}) produces wrong URL by appending text into the url

@mjbvz mjbvz transferred this issue from microsoft/vscode Sep 13, 2023
@mjbvz mjbvz removed their assignment Sep 13, 2023
@RyanCavanaugh RyanCavanaugh added Suggestion An idea for TypeScript Help Wanted You can do this Experience Enhancement Noncontroversial enhancements labels Sep 13, 2023
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Sep 13, 2023
@xiBread
Copy link

xiBread commented Sep 13, 2023

The third works if you add a space before and after the pipe. {@link www.google.com | Google}

@vanowm
Copy link
Author

vanowm commented Sep 14, 2023

@xiBread true, as a work around for your own work. However, if you are working on someone else's code who used one of these standards, it might create unwanted results.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Experience Enhancement Noncontroversial enhancements Help Wanted You can do this Suggestion An idea for TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants