Skip to content

Commit

Permalink
fix: 🐛 Fix extra newlines add file end (#630)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored May 7, 2023
1 parent cd69516 commit e2a4a45
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ public String clean(@Var String content, GitLineChange gitLineChange, Change cha
content = content.lines()
.map(v -> changeIfMatches(insertDelta, v, gitLineChange))
.collect(Collectors.joining(lineEnding));
if (endsWithLineEnding) {
content += lineEnding;
}
}
}
if (endsWithLineEnding && !patch.getDeltas().isEmpty()) {
content += lineEnding;
}
return content;
}

Expand Down

0 comments on commit e2a4a45

Please sign in to comment.