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 https://github.com/zephyrproject-rtos/zephyr/issues/83737

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
This commit is contained in:
Benjamin Cabé 2025-01-14 11:54:05 +01:00 committed by Benjamin Cabé
commit 92271d173f

View file

@ -836,7 +836,7 @@ class ZephyrDomain(Domain):
else:
return
if elem:
if elem and "docname" in elem:
if not node.get("refexplicit"):
contnode = [nodes.Text(elem["name"] if type != "board" else elem["full_name"])]