From 8130950e926d7a8b6322ba741447a0edc0f5b977 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 13 Jul 2021 11:11:33 -0400 Subject: [PATCH] wikiheaders: trim whitespace at edges after wordwrapping. --- build-scripts/wikiheaders.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl index dfd1913c4..1ed9b530e 100755 --- a/build-scripts/wikiheaders.pl +++ b/build-scripts/wikiheaders.pl @@ -108,7 +108,9 @@ sub wordwrap { $retval .= $2; # don't wrap it. } - return $retval . wordwrap_paragraphs($str); # wrap what's left. + $retval .= wordwrap_paragraphs($str); # wrap what's left. + $retval =~ s/\n+$//; + return $retval; }