瀏覽代碼

Fixes extra newline in multiline commit messages

main
Eric Amodio 7 年之前
父節點
當前提交
c1c65127b7
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      src/git/formatters/commit.ts

+ 1
- 1
src/git/formatters/commit.ts 查看文件

@ -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…
取消
儲存