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

Regress in 3.12.x breaks links to headers that themselves contain links

Open soul-codes opened this issue 1 year ago • 1 comments

Test case

This is a [link to a linked header](#this-header-is-linked)

# This header is [linked](#somewhere)

## Somewhere

This reports a deadlink for #this-header-is-linked for 3.12.x but a live link for 3.11.2.

Thanks for this wonderful tool! 🙏 Happy to dig and PR if desired.

soul-codes avatar Jul 08 '24 17:07 soul-codes

This was fixed by b2beaa0 (https://github.com/tcort/markdown-link-check/pull/328).

$ printf 'This is a [link to a linked header](#this-header-is-linked)\n\n# This header is [linked](#somewhere)\n\n## Somewhere' > /tmp/foo.md

$ npx github:tcort/markdown-link-check#3c31a25 /tmp/foo.md  # Last bad commit.

FILE: C:/Users/per/AppData/Local/Temp/foo.md
  [✖] #this-header-is-linked
  [✓] #somewhere

  2 links checked.

  ERROR: 1 dead links found!
  [✖] #this-header-is-linked → Status: 404

$ npx github:tcort/markdown-link-check#b2beaa0 /tmp/foo.md  # First good commit.

FILE: C:/Users/per/AppData/Local/Temp/foo.md
  [✓] #this-header-is-linked
  [✓] #somewhere

  2 links checked.

per1234 avatar Apr 09 '25 07:04 per1234

This issue has been marked as stale because it has been open 60 days with no activity. It will be closed in 30 days unless the stale label is removed or someone adds a comment.

github-actions[bot] avatar Jun 08 '25 08:06 github-actions[bot]

This issue was closed because it has been marked as stale for 30 days with no activity.

github-actions[bot] avatar Jul 08 '25 08:07 github-actions[bot]