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's trailing underscore is not shown in the quickinfo of a reference #55005

Closed
yf-yang opened this issue Jul 13, 2023 · 2 comments
Closed
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@yf-yang
Copy link

yf-yang commented Jul 13, 2023

Bug Report

πŸ”Ž Search Terms

  • jsdoc
  • underscore

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about all stuff.

⏯ Playground Link

playground link

πŸ’» Code

/**
 * @see {@link https://docs.python.org/3/reference/datamodel.html#object.__repr__}
 */
function repr() {}

πŸ™ Actual behavior

When hovering and get quickinfo:
image

πŸ™‚ Expected behavior

Those two underscore at the end of the link should be part of the link

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this labels Jul 13, 2023
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Jul 13, 2023
@a-tarasyuk
Copy link
Contributor

The linkText includes the entire link. @RyanCavanaugh Is that correct?

{
    "marker": {
      "fileName": "/tests/cases/fourslash/quickInfoLink11.ts",
      "position": 100,
      "name": ""
    },
    "item": {
      "kind": "function",
      "kindModifiers": "",
      "textSpan": {
        "start": 100,
        "length": 4
      },
      "displayParts": [
        {
          "text": "function",
          "kind": "keyword"
        },
        {
          "text": " ",
          "kind": "space"
        },
        {
          "text": "repr",
          "kind": "functionName"
        },
        {
          "text": "(",
          "kind": "punctuation"
        },
        {
          "text": ")",
          "kind": "punctuation"
        },
        {
          "text": ":",
          "kind": "punctuation"
        },
        {
          "text": " ",
          "kind": "space"
        },
        {
          "text": "void",
          "kind": "keyword"
        }
      ],
      "documentation": [],
      "tags": [
        {
          "name": "see",
          "text": [
            {
              "text": "",
              "kind": "text"
            },
            {
              "text": "{@link ",
              "kind": "link"
            },
            {
              "text": "https://docs.python.org/3/reference/datamodel.html#object.__repr__",
              "kind": "linkText"
            },
            {
              "text": "}",
              "kind": "link"
            }
          ]
        }
      ]
    }
  }

@jeswinsimon
Copy link
Contributor

This is not an issue on the typescript complier side. vscode uses Marked for rendering markdown here. Marked strips off trailing underscores as per GFM spec. This was also previously discussed in markedjs/marked#2757. This has to be fixed in vscode since typescript language service returns the right url.

The same issue can also be observed in Github's markdown renderer by directly pasting in the url. https://docs.python.org/3/reference/datamodel.html#object.__repr__

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

4 participants