From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
" Nícolas F. R. A. Prado" <nfraprado@collabora.com>
Subject: Re: [PATCH v2 1/3] docs: automarkup: Remove some Sphinx 2 holdovers
Date: Wed, 4 Jun 2025 16:56:49 +0200 [thread overview]
Message-ID: <20250604165649.5a66cb6b@sal.lan> (raw)
In-Reply-To: <20250604143645.78367-2-corbet@lwn.net>
Em Wed, 4 Jun 2025 08:36:43 -0600
Jonathan Corbet <corbet@lwn.net> escreveu:
> Remove a few declarations that are no longer doing anything now that we
> have left Sphinx 2 behind.
>
> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
> ---
> v2: Remove RE_generic_type as suggested by Mauro
>
> Documentation/sphinx/automarkup.py | 18 ++----------------
> 1 file changed, 2 insertions(+), 16 deletions(-)
>
> diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py
> index fd633f7a0bc3..7828aeac92e7 100644
> --- a/Documentation/sphinx/automarkup.py
> +++ b/Documentation/sphinx/automarkup.py
> @@ -22,12 +22,6 @@ from kernel_abi import get_kernel_abi
> #
> RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=re.ASCII)
>
> -#
> -# Sphinx 2 uses the same :c:type role for struct, union, enum and typedef
> -#
> -RE_generic_type = re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_]\w+)',
> - flags=re.ASCII)
> -
> #
> # Sphinx 3 uses a different C role for each one of struct, union, enum and
> # typedef
> @@ -150,20 +144,12 @@ def markup_func_ref_sphinx3(docname, app, match):
> return target_text
>
> def markup_c_ref(docname, app, match):
> - class_str = {# Sphinx 2 only
> - RE_function: 'c-func',
> - RE_generic_type: 'c-type',
> - # Sphinx 3+ only
> - RE_struct: 'c-struct',
> + class_str = {RE_struct: 'c-struct',
> RE_union: 'c-union',
> RE_enum: 'c-enum',
> RE_typedef: 'c-type',
> }
> - reftype_str = {# Sphinx 2 only
> - RE_function: 'function',
> - RE_generic_type: 'type',
> - # Sphinx 3+ only
> - RE_struct: 'struct',
> + reftype_str = {RE_struct: 'struct',
> RE_union: 'union',
> RE_enum: 'enum',
> RE_typedef: 'type',
next prev parent reply other threads:[~2025-06-04 14:56 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 14:36 [PATCH v2 0/3] docs: some automarkup improvements Jonathan Corbet
2025-06-04 14:36 ` [PATCH v2 1/3] docs: automarkup: Remove some Sphinx 2 holdovers Jonathan Corbet
2025-06-04 14:56 ` Mauro Carvalho Chehab [this message]
2025-06-04 14:36 ` [PATCH v2 2/3] docs: automarkup: Mark up undocumented entities too Jonathan Corbet
2025-06-04 14:57 ` Mauro Carvalho Chehab
2025-06-04 14:36 ` [PATCH v2 3/3] docs: CSS: make cross-reference links more evident Jonathan Corbet
2025-06-04 14:59 ` Mauro Carvalho Chehab
2025-06-04 22:05 ` [PATCH v2 0/3] docs: some automarkup improvements Nícolas F. R. A. Prado
2025-06-05 3:00 ` Bagas Sanjaya
2025-06-05 16:32 ` Jonathan Corbet
2025-06-06 15:57 ` Nícolas F. R. A. Prado
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250604165649.5a66cb6b@sal.lan \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfraprado@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.