Skip to content

Commit 0518949

Browse files
rddunlapLinus Torvalds
authored andcommitted
[PATCH] kernel-doc: drop leading space in sections
Drop leading space of kernel-doc section contents. "Section" data (contents) are split from the section header (e.g., Note: below is a section header: * Note: list_empty on entry does not return true after this, the entry is * in an undefined state. ). Currently the data/contents begins with a space and is left that way, which causes it to look bad when printed (in text mode; see example below), so just remove the leading space. Note: list_empty on entry does not return true after this, the entry is in an undefined state. Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 5d18639 commit 0518949

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎scripts/kernel-doc‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1762,6 +1762,9 @@ sub process_file($) {
17621762

17631763
$contents = $newcontents;
17641764
if ($contents ne "") {
1765+
if (substr($contents, 0, 1) eq " ") {
1766+
$contents = substr($contents, 1);
1767+
}
17651768
$contents .= "\n";
17661769
}
17671770
$section = $newsection;

0 commit comments

Comments
 (0)