summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/changelog.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/changelog.sh b/tools/changelog.sh
index 5f7a14d03..1af74e42d 100755
--- a/tools/changelog.sh
+++ b/tools/changelog.sh
@@ -106,6 +106,9 @@ function parse-commit {
message="${match[1]}"
# remove CR characters (might be inserted in GitHub UI commit description form)
message="${message//$'\r'/}"
+ # remove lines containing only whitespace
+ local nlnl=$'\n\n'
+ message="${message//$'\n'[[:space:]]##$'\n'/$nlnl}"
# skip next paragraphs (separated by two newlines or more)
message="${message%%$'\n\n'*}"
# ... and replace newlines with spaces