mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-22 13:28:00 +08:00
fix(changelog): ignore lines containing whitespace in breaking change commits
This commit is contained in:
parent
1ad167dfac
commit
c7bb88f9ad
|
@ -106,6 +106,9 @@ function parse-commit {
|
||||||
message="${match[1]}"
|
message="${match[1]}"
|
||||||
# remove CR characters (might be inserted in GitHub UI commit description form)
|
# remove CR characters (might be inserted in GitHub UI commit description form)
|
||||||
message="${message//$'\r'/}"
|
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)
|
# skip next paragraphs (separated by two newlines or more)
|
||||||
message="${message%%$'\n\n'*}"
|
message="${message%%$'\n\n'*}"
|
||||||
# ... and replace newlines with spaces
|
# ... and replace newlines with spaces
|
||||||
|
|
Loading…
Reference in New Issue
Block a user