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 <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/6b036ef7d746f26d7d0044626b04d1f0880a2188.1740387599.git.mchehab+huawei@kernel.org
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Mauro Carvalho Chehab
2025-02-24 10:08:11 +01:00
committed by Jonathan Corbet
parent 99326b2155
commit b9609ecba3

View File

@@ -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";
}