You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FR: Anchor validation warning should remind the user it's case sensitive, especially if there are case-insensitive matches. #3703
With MkDocs 1.6 and validation: anchors: warn, I had this warning:
WARNING - Doc file 'github.md' contains a link 'tutorial.md#Conflicts', but the doc 'tutorial.md' does not contain an anchor '#Conflicts'.
while tutorial.md did contain a subheading:
...
## Conflicts
...
Changing the anchor in tutorial.md from tutorial.md#Conflicts to tutorial.md#conflicts fixed the issue. However, I think MkDocs should have compared the anchors case-insensitively form the beginning. the warning was confusing.
Cc the similar #3690, but this bug has a smaller scope and has nothing to do with extensions.
Alternatively, if case sensitivity is expected, please consider changing the warning to emphasize that it's case-sensitive, at least if there is a heading that matches case-insensitively. I was confused for quite a bit.
changed the title [-]Anchor validation should be case insensitive[/-][+]FR: Anchor validation warning should remind the user it's case sensitive, especially if there are case-insensitive matches.[/+]on May 12, 2024
Activity
ilyagr commentedon May 12, 2024
Alternatively, if case sensitivity is expected, please consider changing the warning to emphasize that it's case-sensitive, at least if there is a heading that matches case-insensitively. I was confused for quite a bit.
pawamoy commentedon May 12, 2024
My browser seems to be case sensitive too though (Firefox), so the warning would be valid in my case.
ilyagr commentedon May 12, 2024
Good point! VS Code was not case sensitive, so I didn't realize.
I'll change the title to make this into a feature request to adjust the warning.
[-]Anchor validation should be case insensitive[/-][+]FR: Anchor validation warning should remind the user it's case sensitive, especially if there are case-insensitive matches.[/+]docs: ask MkDocs to fail on links to non-existent sections
Suggest case-insensitive matches in anchor validation warnings (#83)