Commit a4a79eaa authored by Marc Cornellà's avatar Marc Cornellà
Browse files

fix(changelog): remove CR characters in breaking change messages

The GitHub UI might not remove CR characters from commit description forms
filled from a Windows browser.
parent a251233b
......@@ -91,6 +91,8 @@ function parse-commit {
if [[ "$body" =~ "BREAKING CHANGE: (.*)" || \
"$subject" =~ '^[^ :\)]+\)?!: (.*)$' ]]; then
message="${match[1]}"
# remove CR characters (might be inserted in GitHub UI commit description form)
message="${message//$'\r'/}"
# skip next paragraphs (separated by two newlines or more)
message="${message%%$'\n\n'*}"
# ... and replace newlines with spaces
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment