Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6450c895 authored by Jani Nikula's avatar Jani Nikula
Browse files

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: default avatarJani Nikula <jani.nikula@intel.com>
parent 830066a7
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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}:$.): ";