Microsoft/TypeScript

JSDoc @link masked URL hyperlinks too far

Open

#51.133 aperta il 8 ott 2022

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)TypeScript (6726 fork)batch import
BugDomain: JSDocHelp Wanted

Metriche repository

Star
 (48.455 star)
Metriche merge PR
 (Merge medio 6g 17h) (9 PR mergiate in 30 g)

Descrizione

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.

Guida contributor