From: Mauro Carvalho Chehab Date: Fri, 6 Mar 2026 15:45:51 +0000 (+0100) Subject: docs: kdoc_output: better handle lists X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab9150972f21c41d4487e5d4b21cea0ecfe0bb94;p=thirdparty%2Fkernel%2Flinux.git docs: kdoc_output: better handle lists On several functions, the return values are inside a bullet list. Also, on some places, there are numbered lists as well. Use a troff markup to format them, to avoid placing everything on a single line. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Jonathan Corbet Message-ID: --- diff --git a/tools/lib/python/kdoc/kdoc_output.py b/tools/lib/python/kdoc/kdoc_output.py index df9af444da579..08539dd92cbb4 100644 --- a/tools/lib/python/kdoc/kdoc_output.py +++ b/tools/lib/python/kdoc/kdoc_output.py @@ -963,6 +963,14 @@ class ManFormat(OutputFormat): i += 1 continue + # + # Handle lists + # + line = KernRe(r'^[-*]\s+').sub(r'.IP \[bu]\n', line) + line = KernRe(r'^(\d+|a-z)[\.\)]\s+').sub(r'.IP \1\n', line) + else: + line = ".PP\n" + i += 1 self.data += line + "\n"