diff --git a/src/cz_changeup/cz_changeup.py b/src/cz_changeup/cz_changeup.py index c01d920..49ca1a1 100644 --- a/src/cz_changeup/cz_changeup.py +++ b/src/cz_changeup/cz_changeup.py @@ -23,7 +23,9 @@ def changelog_message_builder_hook( if self.show_body and commit.body: msg += f"\n\n{' ' * self.body_indent}" - body = commit.body.replace("\n", "\n" + (" " * self.body_indent)) + body = ("\n\n" + (" " * self.body_indent)).join( + [s.strip() for s in str(commit.body).split("\n") if s] + ) msg += f"{body}" parsed_message["message"] = msg