markdown-link-check icon indicating copy to clipboard operation
markdown-link-check copied to clipboard

Broken by footnote

Open d-tsuji opened this issue 3 years ago • 2 comments

What happened?

Footnotes are inspected by markdown-link-check and fail.

sample

  • Sample.md
# sample 

This is sample footnote[^1].

[^1]: foot

Result

$ markdown-link-check Sample.md

FILE: README.md
[✖] foot

1 links checked.

ERROR: 1 dead links found!
[✖] foot → Status: 400

background

GitHub and others support footnotes. Yes, footnotes are links, but they are also checked by markdown-link-check.

https://github.blog/changelog/2021-09-30-footnotes-now-supported-in-markdown-fields/

Expected

Is there any way to ignore footnotes?

Option of ignorePatterns checks for link destination strings. Therefore, the following settings will not work.

{
    "ignorePatterns": [
        {"pattern":"^\^"}
    ]
}

This is because footnote links usually do not contain specific strings, such as http.

d-tsuji avatar Sep 20 '22 23:09 d-tsuji