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 <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <edea87623550a51086c23c9af0edc5e9fcce0ed6.1772810752.git.mchehab+huawei@kernel.org>
This commit is contained in:
Mauro Carvalho Chehab
2026-03-06 16:45:51 +01:00
committed by Jonathan Corbet
parent 908ae13b18
commit ab9150972f

View File

@@ -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"