docs: automarkup: Move common logic to add and resolve xref to helper
authorNícolas F. R. A. Prado <nfraprado@collabora.com>
Tue, 8 Apr 2025 17:57:47 +0000 (13:57 -0400)
committerJonathan Corbet <corbet@lwn.net>
Mon, 14 Apr 2025 16:04:07 +0000 (10:04 -0600)
commitfb42d8dcbc3f01782b4df4ef2b69ec5a902d992e
tree0794bce6f6c19ed1d4b6cfd78c7120fff8fcd736
parent9f488ccd0f567ca66a146bc31e6578cba3b5abee
docs: automarkup: Move common logic to add and resolve xref to helper

Several of the markup functions contain the same code, calling into
sphinx's pending_xref and resolve_xref functions to add and resolve a
cross-reference, with only a few of the parameters changed (domain,
reference type, markup content). Move this logic to its own function and
reuse it in the markup functions.

No functional change.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250408-automarkup-resolve-xref-helper-v2-1-e0a9b8fc7fdd@collabora.com
Documentation/sphinx/automarkup.py