diff options
author | Jani Nikula <jani.nikula@intel.com> | 2016-05-26 22:04:42 +0300 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2016-05-30 13:39:00 +0300 |
commit | 6450c8957ee3a8f58191c2ed6c5b71c7b7d1b310 (patch) | |
tree | f8ea7e03f396d11a6aaa6d0558bc9306ef4d3096 /scripts | |
parent | 830066a7a317e3e8872cb2d21dd24af0815f51f9 (diff) | |
download | talos-op-linux-6450c8957ee3a8f58191c2ed6c5b71c7b7d1b310.tar.gz talos-op-linux-6450c8957ee3a8f58191c2ed6c5b71c7b7d1b310.zip |
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')
-rwxr-xr-x | scripts/kernel-doc | 4 |
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($) { } elsif (/$doc_content/) { if ($inline_doc_state == STATE_INLINE_TEXT) { $contents .= $1 . "\n"; + # nuke leading blank lines + if ($contents =~ /^\s*$/) { + $contents = ""; + } } elsif ($inline_doc_state == STATE_INLINE_NAME) { $inline_doc_state = STATE_INLINE_ERROR; print STDERR "Warning(${file}:$.): "; |