Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9ea90b5

Browse files
committed
DOC: Fix missing cross-reference checks for sphinx-tags
In cda4372, I "simplified" from `node['refdomain']` to the existing `domain` argument. With `sphinx-tags`, the `warn-missing-reference` event occurs for a `None` domain, and we crash trying to access `domain.name`. But `node['refdomain']` is still an empty string, so revert back to that.
1 parent 42b88d0 commit 9ea90b5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/sphinxext/missing_references.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,11 @@ def handle_missing_reference(app, domain, node):
100100
#. record missing references for saving/comparing with ignored list.
101101
#. prevent Sphinx from raising a warning on ignored references.
102102
"""
103-
typ = node["reftype"]
103+
refdomain = node["refdomain"]
104+
reftype = node["reftype"]
104105
target = node["reftarget"]
105106
location = get_location(node, app)
106-
domain_type = f"{domain.name}:{typ}"
107+
domain_type = f"{refdomain}:{reftype}"
107108

108109
app.env.missing_references_events[(domain_type, target)].add(location)
109110

0 commit comments

Comments
 (0)