[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b06fff0d-7e15-45ac-877c-62479526a1aa@notapiano>
Date: Mon, 7 Apr 2025 15:57:41 -0400
From: Nícolas F. R. A. Prado <nfraprado@...labora.com>
To: Jonathan Corbet <corbet@....net>
Cc: kernel@...labora.com, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] docs: automarkup: Move common logic to add and resolve
xref to helper
On Mon, Apr 07, 2025 at 11:42:03AM -0400, Nícolas F. R. A. Prado wrote:
> 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@...labora.com>
> ---
> Documentation/sphinx/automarkup.py | 78 ++++++++++----------------------------
> 1 file changed, 20 insertions(+), 58 deletions(-)
>
> diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py
> index ecf54d22e9dc6ab459a91fde580c1cf161f054ed..8b129835e521428c0bafdc1584c8ce69252a668d 100644
> --- a/Documentation/sphinx/automarkup.py
> +++ b/Documentation/sphinx/automarkup.py
> @@ -128,13 +128,11 @@ def note_failure(target):
> # own C role, but both match the same regex, so we try both.
> #
> def markup_func_ref_sphinx3(docname, app, match):
> - cdom = app.env.domains['c']
> #
> # Go through the dance of getting an xref out of the C domain
> #
I just noticed I missed these comments, they refer to the code that was moved to
the helper. I'll delete them in the markup functions for v2.
Thanks,
Nícolas
Powered by blists - more mailing lists