From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 5/5] Documentation: gen_commands.py: escape name in title
Date: Fri, 24 Oct 2025 11:07:06 +0200 [thread overview]
Message-ID: <20251024090708.2476109-5-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20251024090708.2476109-1-a.fatoum@pengutronix.de>
Underscores in headings seem to be ignored, but let's play it safe and
escape the name as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
Documentation/gen_commands.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/gen_commands.py b/Documentation/gen_commands.py
index f8a7ed7b879f..1a7353a854cd 100755
--- a/Documentation/gen_commands.py
+++ b/Documentation/gen_commands.py
@@ -104,9 +104,9 @@ def gen_rst(name, cmd):
out.append('.. _command_%s:' % name)
out.append('')
if 'c_desc' in cmd:
- out.append("%s - %s" % (name, ''.join(cmd['c_desc']).strip()))
+ out.append("%s - %s" % (string_escape(name), ''.join(cmd['c_desc']).strip()))
else:
- out.append("%s" % (name,))
+ out.append("%s" % (string_escape(name),))
out.append('=' * len(out[-1]))
out.append('')
if 'c_opts' in cmd:
--
2.47.3
prev parent reply other threads:[~2025-10-24 9:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 9:07 [PATCH 1/5] Documentation: gen_commands.py: escape special characters Ahmad Fatoum
2025-10-24 9:07 ` [PATCH 2/5] Documentation: gen_commands.py: align whitespace with coding style Ahmad Fatoum
2025-10-24 9:07 ` [PATCH 3/5] Documentation: gen_commands.py: rework if statements for compactness Ahmad Fatoum
2025-10-24 9:07 ` [PATCH 4/5] Documentation: gen_commands.py: use literal block for help text Ahmad Fatoum
2025-10-24 9:07 ` Ahmad Fatoum [this message]
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=20251024090708.2476109-5-a.fatoum@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.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