mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix for sphinx-doc/sphinx#9291
This commit is contained in:
parent
df71e62dd8
commit
732a7d673d
@ -305,6 +305,16 @@ def missing_reference(app: Sphinx, env: BuildEnvironment, node: pending_xref,
|
||||
to_try.append((inventories.named_inventory[setname], full_qualified_name))
|
||||
for inventory, target in to_try:
|
||||
for objtype in objtypes:
|
||||
# Special case handling for term to search in a case insensitive fashion
|
||||
if objtype == 'std:term' and objtype in inventory:
|
||||
cased_keys = {k.lower(): k for k in inventory[objtype].keys()}
|
||||
if target.lower() in cased_keys:
|
||||
corrected_target = cased_keys[target.lower()]
|
||||
proj, version, uri, dispname = inventory[objtype][corrected_target]
|
||||
else:
|
||||
continue
|
||||
else:
|
||||
# Default behaviour pre-patch
|
||||
if objtype not in inventory or target not in inventory[objtype]:
|
||||
continue
|
||||
proj, version, uri, dispname = inventory[objtype][target]
|
||||
|
Loading…
Reference in New Issue
Block a user