瀏覽代碼

Re-adds commit id for consistency

Tightens up spacing as well
main
Eric Amodio 7 年之前
父節點
當前提交
7e88cb7368
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. +9
    -3
      src/annotations/annotations.ts

+ 9
- 3
src/annotations/annotations.ts 查看文件

@ -56,8 +56,11 @@ export class Annotations {
let openInRemoteCommand = '';
let showCommitDetailsCommand = '';
if (!commit.isUncommitted) {
if (hasRemotes) openInRemoteCommand = `${' '.repeat(3)} [\`${GlyphChars.ArrowUpRight}\`](${OpenCommitInRemoteCommand.getMarkdownCommandArgs(commit.sha)} "Open in Remote")   `;
showCommitDetailsCommand = `[\`${commit.shortSha}\`](${ShowQuickCommitDetailsCommand.getMarkdownCommandArgs(commit.sha)} "Show Commit Details")   `;
if (hasRemotes) {
openInRemoteCommand = `${' '.repeat(2)} [\`${GlyphChars.ArrowUpRight}\`](${OpenCommitInRemoteCommand.getMarkdownCommandArgs(commit.sha)} "Open in Remote") `;
}
showCommitDetailsCommand = `[\`${commit.shortSha}\`](${ShowQuickCommitDetailsCommand.getMarkdownCommandArgs(commit.sha)} "Show Commit Details")`;
message = commit.message
// Escape markdown
.replace(escapeMarkdownRegEx, '\\$&')
@ -67,8 +70,11 @@ export class Annotations {
.replace(/\n/g, ' \n');
message = `\n\n> ${message}`;
}
else {
showCommitDetailsCommand = `\`${commit.shortSha}\``;
}
const markdown = new MarkdownString(`${showCommitDetailsCommand}__${commit.author}__, ${commit.fromNow()}   _(${commit.formatDate(dateFormat)})_ ${openInRemoteCommand}${message}`);
const markdown = new MarkdownString(`${showCommitDetailsCommand}   __${commit.author}__, ${commit.fromNow()}   _(${commit.formatDate(dateFormat)})_ ${openInRemoteCommand}${message}`);
markdown.isTrusted = true;
return markdown;
}

Loading…
取消
儲存