Skip to content

Typedoc shouldn't warn that for a footnote that doesn't contain a link at all, the "file" that is the first word of it doesn't exist and won't be copied to output #2991

Closed

Description

@jswalden

Search terms

footnote, markdown-it, markdown-it-footnote, relative, link

Expected Behavior

Typedoc shouldn't warn about footnotes that don't contain links at all.

Actual Behavior

Typedoc seems to think that footnote markup will always contain a link -- but if it doesn't, if the footnote contains just a bunch of text, it appears it'll check for the existence of the "file" indicated by the first word in the text and then complain if it doesn't exist.

Steps to reproduce the bug

https://github.com/jswalden/typedoc-footnote-not-link

and then yarn install && yarn build:

jwalden@the-great-waldo-search:~/Code/typedoc-footnote-not-link$ yarn install && yarn build
➤ YN0000: · Yarn 4.9.2
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: · Done in 0s 340ms
./README.md:5:13 - [warning] The relative path This is not a file and will not be copied to the output directory

5    [^footnote]: This is a footnote.

[info] html generated at ./docs
[warning] Found 0 errors and 1 warnings

"This" is not a link, and the footnote shouldn't be treated like one. (Yes, Typedoc by default doesn't understand non-link footnotes -- but if you hook up markdown-it-footnote as this repository does, it can understand them. And to be clear, Typedoc produces this warning without markdown-it-footnote hooked up.)

Environment

  • Typedoc version: 0.28.9
  • TypeScript version: 5.8.3
  • Node.js version: 22.17.1
  • OS: Fedora Linux

tho I'm pretty sure this is a logic issue in the module and only the Typedoc version matters here.

Activity

  1. added theissue type on Aug 5, 2025
  2. Gerrit0 commented on Aug 6, 2025

    @Gerrit0
    Collaborator

    Yuck! This is going to be absolutely horrible to fix and honestly might end up as a wontfix. TypeDoc's relative link discovery happens before passing text to the markdown parser, so any plugins which modify link resolution like this one are essentially prevented from working.

    I'm not sure there's a good way to change this which doesn't have other very undesirable consequences such as severely increasing the in memory and on disk (json) serialized model size and making it considerably more difficult for typedoc to maintain backwards compatibility for it's produced json files.

  3. Gerrit0 commented on Aug 9, 2025

    @Gerrit0
    Collaborator

    ... well, I could just make TypeDoc ignore reference blocks which look like they might be footnotes. I think that's a reasonably safe thing to do as it seems pretty unlikely that someone uses a reference with ^ without intending it to be interpreted as a footnote.

  4. added a commit that references this issue on Aug 9, 2025
    b006595
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions