Skip to content

Commit 92271d1

Browse files
committed
doc: _extensions: fix :zephyr:board: role with Intersphinx
Resolving the target for a zephyr:board role when using Interpshinx needs to account for the fact that a board object might be in the domain (it's part of the catalog), and yet not have any actual docname associated with it for there's no page in the "local" docs that defines a ..zephyr:board:: documentation for it. Handle that case so that ZephyrDomain#resolve_xref yields to Intersphinx that will eventually find the target in the inventory for docs.zephyrproject.org. Fixes #83737 Signed-off-by: Benjamin Cabé <[email protected]>
1 parent fafef7b commit 92271d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/_extensions/zephyr/domain/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ def resolve_xref(self, env, fromdocname, builder, type, target, node, contnode):
836836
else:
837837
return
838838

839-
if elem:
839+
if elem and "docname" in elem:
840840
if not node.get("refexplicit"):
841841
contnode = [nodes.Text(elem["name"] if type != "board" else elem["full_name"])]
842842

0 commit comments

Comments
 (0)