diff options
| author | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2026-03-06 16:45:51 +0100 |
|---|---|---|
| committer | Jonathan Corbet <corbet@lwn.net> | 2026-03-09 10:34:39 -0600 |
| commit | ab9150972f21c41d4487e5d4b21cea0ecfe0bb94 (patch) | |
| tree | 1c027effb3ad15aef67bdc503d1ef1202739a554 /tools/lib/python/kdoc | |
| parent | 908ae13b1864c05bcde8cfc7127ec147d28f9414 (diff) | |
| download | lwn-ab9150972f21c41d4487e5d4b21cea0ecfe0bb94.tar.gz lwn-ab9150972f21c41d4487e5d4b21cea0ecfe0bb94.zip | |
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>
Diffstat (limited to 'tools/lib/python/kdoc')
| -rw-r--r-- | tools/lib/python/kdoc/kdoc_output.py | 8 |
1 files changed, 8 insertions, 0 deletions
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" |
