Skip to content

Commit b99a9da

Browse files
committed
Ensures summary is always trimmed
1 parent a1da916 commit b99a9da

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/git/parsers/logParser.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,16 +665,15 @@ export function parseGitLog(
665665
line = next.value;
666666
if (line === '</s>') break;
667667

668-
if (entry.summary === undefined) {
668+
if (entry.summary == null) {
669669
entry.summary = line;
670670
} else {
671671
entry.summary += `\n${line}`;
672672
}
673673
}
674674

675-
// Remove the trailing newline
676-
if (entry.summary != null && entry.summary.charCodeAt(entry.summary.length - 1) === 10) {
677-
entry.summary = entry.summary.slice(0, -1);
675+
if (entry.summary != null) {
676+
entry.summary = entry.summary.trim();
678677
}
679678
break;
680679

0 commit comments

Comments
 (0)