Skip to content

Commit

Permalink
[PATCH] kernel-doc: drop leading space in sections
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
rddunlap authored and Linus Torvalds committed Jun 25, 2006
1 parent 5d18639 commit 0518949
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/kernel-doc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0518949

Please sign in to comment.