From: Mauro Carvalho Chehab Date: Mon, 24 Feb 2025 09:08:11 +0000 (+0100) Subject: scripts/kernel-doc: don't add not needed new lines X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b9609ecba35ecf7fa85d9bcd519242009174e6a2;p=users%2Fwilly%2Fxarray.git scripts/kernel-doc: don't add not needed new lines This helps comparing kernel-doc output with the new .py version of it. Signed-off-by: Mauro Carvalho Chehab Link: https://lore.kernel.org/r/6b036ef7d746f26d7d0044626b04d1f0880a2188.1740387599.git.mchehab+huawei@kernel.org Signed-off-by: Jonathan Corbet --- diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 2c77b914d017..d59552e1a31d 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -760,6 +760,10 @@ sub output_highlight_rst { if ($block) { $output .= highlight_block($block); } + + $output =~ s/^\n+//g; + $output =~ s/\n+$//g; + foreach $line (split "\n", $output) { print $lineprefix . $line . "\n"; }