From: Utkarsh Tripathi <utripathi2002@gmail.com>
To: corbet@lwn.net, akiyks@gmail.com
Cc: Utkarsh Tripathi <utripathi2002@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org
Subject: [PATCH v2] Sphinx error fixed for inline literal end-string by changing $type_constant2 in kernel-doc script to include "*" unicode character in highlights_rst.
Date: Wed, 1 May 2024 23:27:30 +0530 [thread overview]
Message-ID: <20240501175730.23326-1-utripathi2002@gmail.com> (raw)
In-Reply-To: <b9e4bedb-6678-42ed-9ac1-c10179be5b69@gmail.com>
The kernel-doc script uses the $type_constant2 variable to match
expressions used to find embedded type information. The current
implementation of $type_constant2 does not include the "*" unicode
character, which is used to highlight inline literals in the
documentation. This causes a Sphinx error when the inline literal
end-string is used in the documentation.
This commit follows the pattern of the commit
8aaf297a0dd6 ("docs: scripts: kernel-doc: accept bitwise negation like ~@var")
and takes inspiration from the following commit
69fc23efc7e5 ("kernel-doc: Add unary operator * to $type_param_ref").
Thanks Akira, for your suggestions, I have made the required changes.
I am fairly new to the kernel community, so if I am making
any mistakes while making patches and replying to mails,
please let me know, it will be very helpful.
Signed-off-by: Utkarsh Tripathi <utripathi2002@gmail.com>
Reviewed-by: Akira Yokosawa <akiyks@gmail.com>
Suggested-by: Akira Yokosawa <akiyks@gmail.com>
---
scripts/kernel-doc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index cb1be22afc65..58129b1cf3f4 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -62,7 +62,7 @@ my $anon_struct_union = 0;
# match expressions used to find embedded type information
my $type_constant = '\b``([^\`]+)``\b';
-my $type_constant2 = '\%([-_\w]+)';
+my $type_constant2 = '\%([-_*\w]+)';
my $type_func = '(\w+)\(\)';
my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
my $type_param_ref = '([\!~\*]?)\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
base-commit: 4d2008430ce87061c9cefd4f83daf2d5bb323a96
--
2.34.1
next prev parent reply other threads:[~2024-05-01 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-01 13:32 [PATCH] Sphinx error fixed for inline literal end-string in include/linux/workqueue.h Utkarsh Tripathi
2024-05-01 15:05 ` Akira Yokosawa
2024-05-01 17:57 ` Utkarsh Tripathi [this message]
2024-05-01 18:57 ` [PATCH v2] Sphinx error fixed for inline literal end-string by changing $type_constant2 in kernel-doc script to include "*" unicode character in highlights_rst Jonathan Corbet
2024-05-02 10:39 ` Akira Yokosawa
2024-05-01 18:05 ` Utkarsh Tripathi
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=20240501175730.23326-1-utripathi2002@gmail.com \
--to=utripathi2002@gmail.com \
--cc=akiyks@gmail.com \
--cc=corbet@lwn.net \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).