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

Commit 0a726301 authored by Jani Nikula's avatar Jani Nikula
Browse files

kernel-doc: improve handling of whitespace on the first line param description



Handle whitespace on the first line of param text as if it was the empty
string. There is no need to add the newline in this case. This improves
the rst output in particular, where blank lines may be problematic in
parameter lists.

Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
parent ecbcfba1
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -2814,11 +2814,11 @@ sub process_file($) {
		$in_doc_sect = 1;
		$in_doc_sect = 1;
		$in_purpose = 0;
		$in_purpose = 0;
		$contents = $newcontents;
		$contents = $newcontents;
		if ($contents ne "") {
		while ((substr($contents, 0, 1) eq " ") ||
		while ((substr($contents, 0, 1) eq " ") ||
		       substr($contents, 0, 1) eq "\t") {
		       substr($contents, 0, 1) eq "\t") {
		    $contents = substr($contents, 1);
		    $contents = substr($contents, 1);
		}
		}
		if ($contents ne "") {
		    $contents .= "\n";
		    $contents .= "\n";
		}
		}
		$section = $newsection;
		$section = $newsection;