Browse Source

Fixes extra newline in multiline commit messages

main
Eric Amodio 7 years ago
parent
commit
c1c65127b7
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/git/formatters/commit.ts

+ 1
- 1
src/git/formatters/commit.ts View File

@ -138,7 +138,7 @@ export class CommitFormatter {
}
static toHoverAnnotation(commit: GitCommit, dateFormat: string = 'MMMM Do, YYYY h:MMa'): string | string[] {
const message = commit.isUncommitted ? '' : `\n\n> ${commit.message.replace(/\n/g, '\n>\n> ')}`;
const message = commit.isUncommitted ? '' : `\n\n> ${commit.message.replace(/\n/g, ' \n')}`;
return `\`${commit.shortSha}\`   __${commit.author}__, ${moment(commit.date).fromNow()}   _(${moment(commit.date).format(dateFormat)})_${message}`;
}

Loading…
Cancel
Save