Skip to content

Commit

Permalink
fix: ignore empty lines when using split_commits
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoineGS committed Apr 12, 2024
1 parent c7001e9 commit 060c84d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions git-cliff-core/src/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,14 @@ impl<'a> Changelog<'a> {
commit
.message
.lines()
.flat_map(|line| {
.filter_map(|line| {
let mut c = commit.clone();
c.message = line.to_string();
Self::process_commit(c, &self.config.git)
if !c.message.is_empty() {
Self::process_commit(c, &self.config.git)
} else {
None
}
})
.collect()
} else {
Expand Down Expand Up @@ -722,6 +726,7 @@ style: make awesome stuff look better
String::from("123abc"),
String::from(
"chore(deps): bump some deps
chore(deps): bump some more deps
chore(deps): fix broken deps
",
Expand Down

0 comments on commit 060c84d

Please sign in to comment.