[PATCH 05/27] scripts/kernel-doc: don't add not needed new lines
From: Mauro Carvalho Chehab
Date: Wed Feb 19 2025 - 03:37:46 EST
This helps comparing kernel-doc output with the new .py version
of it.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
---
scripts/kernel-doc | 4 ++++
1 file changed, 4 insertions(+)
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";
}
--
2.48.1