summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMarc Cornellà <hello@mcornella.com>2023-04-03 23:27:14 +0200
committerMarc Cornellà <hello@mcornella.com>2023-04-03 23:27:14 +0200
commitc7bb88f9ad3eb742aecca2e36b615819cead10f4 (patch)
tree2bf4e4e77a7c18f7bf2cd3d67545a1cb8cae2395 /tools
parent1ad167dfac325a9f92e0693c70d0ab3f7c4c574b (diff)
downloadzsh-c7bb88f9ad3eb742aecca2e36b615819cead10f4.tar.gz
zsh-c7bb88f9ad3eb742aecca2e36b615819cead10f4.tar.bz2
zsh-c7bb88f9ad3eb742aecca2e36b615819cead10f4.zip
fix(changelog): ignore lines containing whitespace in breaking change commits
Diffstat (limited to 'tools')
-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