-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add linkcheck_ignore_case configuration option #14046
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
base: master
Are you sure you want to change the base?
Add linkcheck_ignore_case configuration option #14046
Conversation
|
Hi @FazeelUsmani - thank you for developing and describing this pull request. I have a concern that enabling the option reduces the precision of other hyperlinks that are checked. Could you explain the use case where it would be easier for a documentation project to enable this option by editing the |
|
That’s a good point, @jayaddison. |
|
@FazeelUsmani got it, understood. As often happens, I had a misunderstanding to begin with - you are saying that this only affects whether case-adjusted response URLs are considered to be Let me think about this a little more; I do understand the value in this now, but am wary of (and trying to think of) any problem side-effects. |
|
(also, thank you for the explanation) |
|
Separately: I do think that we should probably isolate the |
|
Hmm.. makes sense. I can refactor this into two separate options: This would give users more granular control. Most users would likely want |
|
Two options seems overkill for this use-case. What do browsers do de facto on case mismatches on fragment IDs? A |
This PR adds a new configuration option
linkcheck_ignore_caseto 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
linkcheck_ignore_caseboolean configuration option (default:False)AnchorCheckParserto support case-insensitive matching when enableddoc/usage/configuration.rst