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

FR: Anchor validation warning should remind the user it's case sensitive, especially if there are case-insensitive matches. #3703

Open
ilyagr opened this issue May 12, 2024 · 3 comments

Comments

@ilyagr
Copy link

ilyagr commented May 12, 2024

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.

Thank you very much for adding this feature!

@ilyagr
Copy link
Author

ilyagr commented 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
Copy link
Sponsor Contributor

pawamoy commented May 12, 2024

My browser seems to be case sensitive too though (Firefox), so the warning would be valid in my case.

@ilyagr
Copy link
Author

ilyagr commented 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.

@ilyagr ilyagr 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. May 12, 2024
ilyagr added a commit to martinvonz/jj that referenced this issue May 14, 2024
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