aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-05-26 15:04:42 -0400
committerJani Nikula <jani.nikula@intel.com>2016-05-30 06:39:00 -0400
commit6450c8957ee3a8f58191c2ed6c5b71c7b7d1b310 (patch)
treef8ea7e03f396d11a6aaa6d0558bc9306ef4d3096 /scripts/kernel-doc
parent830066a7a317e3e8872cb2d21dd24af0815f51f9 (diff)
kernel-doc: strip leading blank lines from inline doc comments
The inline member markup allows whitespace lines before the actual documentation starts. Strip the leading blank lines. This improves the rst output. Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index a89ff3ca366c..e8ea295567a3 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -2889,6 +2889,10 @@ sub process_file($) {
2889 } elsif (/$doc_content/) { 2889 } elsif (/$doc_content/) {
2890 if ($inline_doc_state == STATE_INLINE_TEXT) { 2890 if ($inline_doc_state == STATE_INLINE_TEXT) {
2891 $contents .= $1 . "\n"; 2891 $contents .= $1 . "\n";
2892 # nuke leading blank lines
2893 if ($contents =~ /^\s*$/) {
2894 $contents = "";
2895 }
2892 } elsif ($inline_doc_state == STATE_INLINE_NAME) { 2896 } elsif ($inline_doc_state == STATE_INLINE_NAME) {
2893 $inline_doc_state = STATE_INLINE_ERROR; 2897 $inline_doc_state = STATE_INLINE_ERROR;
2894 print STDERR "Warning(${file}:$.): "; 2898 print STDERR "Warning(${file}:$.): ";