Microsoft/TypeScript

JSDoc @link masked URL hyperlinks too far

Open

#51,133 opened on Oct 8, 2022

View on GitHub
 (1 comment) (0 reactions) (0 assignees)TypeScript (48,455 stars) (6,726 forks)batch import
BugDomain: JSDocHelp Wanted

Description

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

  • VS Code Version:
Version: 1.73.0-insider
Commit: fad3a77833b9249158dfd88477114a06435e46a2
Date: 2022-10-07T05:18:21.081Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Linux x64 5.10.0-18-amd64 snap
Sandboxed: Yes
  • OS Version: Debian 11

Steps to Reproduce:

  1. Create a TypeScript file.
  2. Paste the following content:
/**
 * @see {@link https://readthedocs.org/|READ THE DOCS}
 */
const foo = "Bar";

According to the documentation, the pipe (|) character is a valid separator, however instead VSC reaches past it, which changes the link and takes the user to a different page than intended.

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

https://jsdoc.app/tags-inline-link.html#syntax

image

Both a space ( ) and pipe (|) are valid delimiters here, but currently only space works.

Contributor guide

JSDoc @link masked URL hyperlinks too far · Microsoft/TypeScript#51133 | Good First Issue