aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/kdoc/kdoc_parser.py
diff options
context:
space:
mode:
authorJonathan Corbet <[email protected]>2025-06-21 20:35:04 +0000
committerJonathan Corbet <[email protected]>2025-06-25 17:30:26 +0000
commit823d6f956605cb2f009f75de138622fcd7e03817 (patch)
tree00719cebd54592aac903390332718cf7c4b763aa /scripts/lib/kdoc/kdoc_parser.py
parentDocumentation: treewide: Replace remaining spinics links with lore (diff)
downloadkernel-823d6f956605cb2f009f75de138622fcd7e03817.tar.gz
kernel-823d6f956605cb2f009f75de138622fcd7e03817.zip
docs: kdoc: Make body_with_blank_line parsing more flexible
The regex in the BODY_WITH_BLANK_LINE case was looking for lines starting with " * ", where exactly one space was allowed before the following text. There are many kerneldoc comments where the authors have put multiple spaces instead, leading to mis-formatting of the documentation. Specifically, in this case, the description portion is associated with the last of the parameters. Allow multiple spaces in this context. See, for example, synchronize_hardirq() and how its documentation is formatted before and after the change. Acked-by: Mauro Carvalho Chehab <[email protected]> Tested-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
-rw-r--r--scripts/lib/kdoc/kdoc_parser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
index 42b2e0936b72..c46e1b6a7d4b 100644
--- a/scripts/lib/kdoc/kdoc_parser.py
+++ b/scripts/lib/kdoc/kdoc_parser.py
@@ -1309,7 +1309,7 @@ class KernelDoc:
"""
if self.state == state.BODY_WITH_BLANK_LINE:
- r = KernRe(r"\s*\*\s?\S")
+ r = KernRe(r"\s*\*\s*\S")
if r.match(line):
self.dump_section()
self.entry.section = SECTION_DEFAULT