Skip to content

Commit

Permalink
fix(git): 🐛 Fix newlines after refactoring and cleaning diff (#769)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt committed Jun 24, 2023
1 parent 50c7727 commit c925285
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public String clean(@Var String content, GitLineChange gitLineChange, Change cha
.collect(Collectors.joining(lineEnding));
}
}
if (endsWithLineEnding && !patch.getDeltas().isEmpty()) {
if (endsWithLineEnding && !patch.getDeltas().isEmpty() && !content.endsWith(lineEnding)) {
content += lineEnding;
}
return content;
Expand Down

0 comments on commit c925285

Please sign in to comment.