Skip to content

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

Open

Description

@ilyagr

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!

Activity

  1. ilyagr commented on May 12, 2024

    @ilyagr
    Author

    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.

  2. pawamoy commented on May 12, 2024

    @pawamoy
    Contributor

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

  3. ilyagr commented on May 12, 2024

    @ilyagr
    Author

    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.

  4. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions