Skip to content

Cmd-Click doesn't work on JSDoc {@link URL|LinkText} format #225513

Description

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version:
  • OS Version:

Steps to Reproduce:

  1. Create a .ts file containing
    /**
     * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers|Promise.withResolvers}
     */
    This is one of the valid ways of providing link text according to https://jsdoc.app/tags-inline-link.
  2. Cmd-Click (or Windows equivalent) on the URL
  3. VSCode opens https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers%7CPromise.withResolvers, instead of https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers

When I tried {@link http://www.google.com|Google}, Cmd-Clicking on the link doesn't open anything, and logs

2024-08-13 12:04:55.265 [error] TypeError: Invalid URL
	at new URL (node:internal/url:797:36)
	at Object.canOpenExternalUri (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/simple-browser/dist/extension.js:1:6134)

Fortunately I can use [Link Text]{@link URL} format, but I expected VSCode to support any valid @link format.

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

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugjavascriptJavaScript support issuestypescriptTypescript support issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions