diff options
-rwxr-xr-x | scripts/kernel-doc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index c7109ca40ba4..01e8a8e22602 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -281,9 +281,10 @@ my $doc_special = "\@\%\$\&"; | |||
281 | my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start. | 281 | my $doc_start = '^/\*\*\s*$'; # Allow whitespace at end of comment start. |
282 | my $doc_end = '\*/'; | 282 | my $doc_end = '\*/'; |
283 | my $doc_com = '\s*\*\s*'; | 283 | my $doc_com = '\s*\*\s*'; |
284 | my $doc_com_body = '\s*\* ?'; | ||
284 | my $doc_decl = $doc_com . '(\w+)'; | 285 | my $doc_decl = $doc_com . '(\w+)'; |
285 | my $doc_sect = $doc_com . '([' . $doc_special . ']?[\w\s]+):(.*)'; | 286 | my $doc_sect = $doc_com . '([' . $doc_special . ']?[\w\s]+):(.*)'; |
286 | my $doc_content = $doc_com . '(.*)'; | 287 | my $doc_content = $doc_com_body . '(.*)'; |
287 | my $doc_block = $doc_com . 'DOC:\s*(.*)?'; | 288 | my $doc_block = $doc_com . 'DOC:\s*(.*)?'; |
288 | 289 | ||
289 | my %constants; | 290 | my %constants; |
@@ -460,6 +461,9 @@ sub output_highlight { | |||
460 | # print STDERR "contents af:$contents\n"; | 461 | # print STDERR "contents af:$contents\n"; |
461 | 462 | ||
462 | foreach $line (split "\n", $contents) { | 463 | foreach $line (split "\n", $contents) { |
464 | if (! $output_preformatted) { | ||
465 | $line =~ s/^\s*//; | ||
466 | } | ||
463 | if ($line eq ""){ | 467 | if ($line eq ""){ |
464 | if (! $output_preformatted) { | 468 | if (! $output_preformatted) { |
465 | print $lineprefix, local_unescape($blankline); | 469 | print $lineprefix, local_unescape($blankline); |
@@ -2085,7 +2089,7 @@ sub process_file($) { | |||
2085 | $descr= $1; | 2089 | $descr= $1; |
2086 | $descr =~ s/^\s*//; | 2090 | $descr =~ s/^\s*//; |
2087 | $descr =~ s/\s*$//; | 2091 | $descr =~ s/\s*$//; |
2088 | $descr =~ s/\s+/ /; | 2092 | $descr =~ s/\s+/ /g; |
2089 | $declaration_purpose = xml_escape($descr); | 2093 | $declaration_purpose = xml_escape($descr); |
2090 | $in_purpose = 1; | 2094 | $in_purpose = 1; |
2091 | } else { | 2095 | } else { |
@@ -2177,6 +2181,7 @@ sub process_file($) { | |||
2177 | # Continued declaration purpose | 2181 | # Continued declaration purpose |
2178 | chomp($declaration_purpose); | 2182 | chomp($declaration_purpose); |
2179 | $declaration_purpose .= " " . xml_escape($1); | 2183 | $declaration_purpose .= " " . xml_escape($1); |
2184 | $declaration_purpose =~ s/\s+/ /g; | ||
2180 | } else { | 2185 | } else { |
2181 | $contents .= $1 . "\n"; | 2186 | $contents .= $1 . "\n"; |
2182 | } | 2187 | } |