[PATCH] kernel-doc: drop leading space in sections
authorRandy Dunlap <rdunlap@xenotime.net>
Sun, 25 Jun 2006 12:47:47 +0000 (05:47 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 25 Jun 2006 17:01:07 +0000 (10:01 -0700)
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>
scripts/kernel-doc

index 99fe4b7fb2f1733a5b4412553c1734a58b39ec2f..fc0835bf65e238bb6b17b5cf0f161f8fddcd2202 100755 (executable)
@@ -1762,6 +1762,9 @@ sub process_file($) {
 
                $contents = $newcontents;
                if ($contents ne "") {
+                   if (substr($contents, 0, 1) eq " ") {
+                       $contents = substr($contents, 1);
+                   }
                    $contents .= "\n";
                }
                $section = $newsection;