Skip to content

Conversation

@FazeelUsmani
Copy link

This PR adds a new configuration option linkcheck_ignore_case to enable case-insensitive URL and anchor checking in the linkcheck builder.

Problem

Some web servers (e.g., GitHub, certain hosting platforms) are case-insensitive and may return URLs with different casing than the original link. This causes the linkcheck builder to report false-positive redirects when the URLs differ only in case, even though they point to the same resource.

Solution

  • Added linkcheck_ignore_case boolean configuration option (default: False)
  • Modified URL comparison logic to support case-insensitive matching when enabled
  • Modified anchor comparison in AnchorCheckParser to support case-insensitive matching when enabled
  • Added comprehensive tests for both URL and anchor case-insensitive checking
  • Updated documentation in doc/usage/configuration.rst

Usage

# conf.py
linkcheck_ignore_case = True

@FazeelUsmani FazeelUsmani marked this pull request as draft November 7, 2025 13:00
@FazeelUsmani FazeelUsmani force-pushed the linkcheck-case-insensitive branch from df8ea16 to 4eb7f2c Compare November 7, 2025 13:46
@FazeelUsmani FazeelUsmani deleted the linkcheck-case-insensitive branch November 7, 2025 13:48
@FazeelUsmani FazeelUsmani restored the linkcheck-case-insensitive branch November 7, 2025 13:48
@FazeelUsmani FazeelUsmani reopened this Nov 7, 2025
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

Successfully merging this pull request may close these issues.

1 participant