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

@link resolving link text when URL is explicitly specified. #2680

Closed
KDean-Dolphin opened this issue Aug 20, 2024 · 3 comments
Closed

@link resolving link text when URL is explicitly specified. #2680

KDean-Dolphin opened this issue Aug 20, 2024 · 3 comments
Labels
bug Functionality does not match expectation
Milestone

Comments

@KDean-Dolphin
Copy link

Search terms

link url package

Expected Behavior

This is typedoc.json for my documentation project:

{
  "$schema": "https://typedoc.org/schema.json",
  "plugin": [
    "typedoc-github-theme"
  ],
  "entryPoints": [
    "../core",
    "../utility",
    "../gs1"
  ],
  "entryPointStrategy": "packages",
  "includeVersion": true,
  "out": "api",
  "theme": "typedoc-github-theme",
  "sourceLinkExternal": true
}

Every package has a similar typedoc.json; this is the one for the "gs1" package:

{
  "$schema": "https://typedoc.org/schema.json",
  "sourceLinkExternal": true,
  "groupOrder": [
    "Enumerations",
    "Type Aliases",
    "Interfaces",
    "Classes",
    "Variables",
    "Enumeration Members",
    "Properties",
    "Constructors",
    "Accessors",
    "Methods",
    "*"
  ],
  "sort": [],
  "name": "GS1",
  "entryPoints": [
    "src/index.ts"
  ]
}

This is from class documentation in my code:

/**
 * Identification key validator. Validates an identification key against its definition in section 3 of the {@link https://www.gs1.org/genspecs | GS1 General Specifications}.
 */

What I expect to see in the HTML is this:

<p>Identification key validator. Validates an identification key against its definition in section 3 of the <a href="https://www.gs1.org/genspecs">GS1 General Specifications</a>.</p>

Actual Behavior

What I'm getting instead is a reference to the GS1 module:

<p>Identification key validator. Validates an identification key against its definition in section 3 of the <a href="../modules/GS1.html" class="tsd-kind-module">General Specifications</a>.</p>

Steps to reproduce the bug

As above. If I change the first word in the display text to anything other than the module name (GS1), the HTML is generated correctly.

Environment

  • Typedoc version: 0.26.5
  • TypeScript version: 5.5.4
  • Node.js version: 21.7.3
  • OS: macOS Sonoma 14.6.1
@KDean-Dolphin KDean-Dolphin added the bug Functionality does not match expectation label Aug 20, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 21, 2024

Oops! Links were parsed/resolved twice

@KDean-Dolphin
Copy link
Author

It's still a problem in 0.26.6. No change to the output.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 22, 2024

0.26.6 does not include this fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

No branches or pull requests

2 participants