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

Anchor link check breaks when target heading comes before the link #324

Open
matthandus opened this issue May 23, 2024 · 1 comment
Open

Comments

@matthandus
Copy link

Thank you for the recent improvements on anchor link checks. We noticed that the anchor link check will still return incorrect result and report dead link when the heading that is targeted comes before the anchor link in the document. When the anchor link is above the heading, it passes as expected.

Working sample

Here is an [anchor link](#heading-link-below) sample that passes, as expected.

### Heading link below

Broken sample

### Heading link above

Here is an [anchor link](#heading-link-above) sample that reports as a dead link.
@dklimpel
Copy link
Contributor

dklimpel commented Jun 1, 2024

I have created some tests: https://github.com/tcort/markdown-link-check/pull/328/files#diff-609278aba9a28dbff1f94a5481c16208f8d0263db1f8784adac9ddac74a18d3a

In the tests I was not able to reproduce this.

I haven't done a proper test. Perhaps the case is so special that it can't be found in the tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants