[PATCH v2 13/13] docs: kdoc_output: better handle lists
From: Mauro Carvalho Chehab
Date: Fri Mar 06 2026 - 10:47:36 EST
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 <mchehab+huawei@xxxxxxxxxx>
---
tools/lib/python/kdoc/kdoc_output.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/lib/python/kdoc/kdoc_output.py b/tools/lib/python/kdoc/kdoc_output.py
index df9af444da57..08539dd92cbb 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"
--
2.52.0