Commit 8130950e926d7a8b6322ba741447a0edc0f5b977

Ryan C. Gordon 2021-07-13T11:11:33

wikiheaders: trim whitespace at edges after wordwrapping.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/build-scripts/wikiheaders.pl b/build-scripts/wikiheaders.pl
index dfd1913..1ed9b53 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;
 }