Skip to content

@link parser should honour actual link text ignoring locally-resolved names #2270

@cefn

Description

@cefn

Search Terms

@link parser should allow https:// links to appear with link text, even if words in the text match with e.g. class names in the codebase.

Problem

In my comment-based documentation I have links like {@link https://en.wikipedia.org/wiki/Immutable_object | Immutable Objects}.

Unfortunately this markdown appears like Objects and it links to an Immutable type that exists in my repo, rather than using the Wikipedia link and providing the link text Immutable Objects as expected. Omitting crucial words changes the fundamental meaning of sentences in the documentation.

 * Flagging all state references as {@link Immutable} guides IDEs to treat these
 * as {@link https://en.wikipedia.org/wiki/Immutable_object | Immutable Objects}
 * to avoid programming errors.

image

Suggested Solution

The presence of the URL should prevent further words from being interpreted as references to internal types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs minimal reproductionNeeds a minimal repro - https://gist.github.com/Rich-Harris/88c5fc2ac6dc941b22e7996af05d70ff

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions