From c7bb88f9ad3eb742aecca2e36b615819cead10f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 3 Apr 2023 23:27:14 +0200 Subject: [PATCH] fix(changelog): ignore lines containing whitespace in breaking change commits --- tools/changelog.sh | 3 +++ 1 file changed, 3 insertions(+) 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