From: Jonathan Corbet Date: Wed, 4 Jun 2025 14:18:04 +0000 (-0600) Subject: docs: automarkup: Mark up undocumented entities too X-Git-Tag: io_uring-6.17-20250815~111^2~93 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d6d1df92c25fd51ab9062db28ef17b2baf72d241;p=linux-block.git docs: automarkup: Mark up undocumented entities too The automarkup code generates markup and a cross-reference link for functions, structs, etc. for which it finds kerneldoc documentation. Undocumented entities are left untouched; that creates an inconsistent reading experience and has caused some writers to go to extra measures to cause the markup to happen. Mark up detected C entities regardless of whether they are documented. Reviewed-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet --- diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py index 7828aeac92e7..e67eb8e19c22 100644 --- a/Documentation/sphinx/automarkup.py +++ b/Documentation/sphinx/automarkup.py @@ -235,8 +235,13 @@ def add_and_resolve_xref(app, docname, domain, reftype, target, contnode=None): if xref: return xref - - return None + # + # We didn't find the xref; if a container node was supplied, + # mark it as a broken xref + # + if contnode: + contnode.set_class("broken_xref") + return contnode # # Variant of markup_abi_ref() that warns whan a reference is not found