|
@ -56,8 +56,11 @@ export class Annotations { |
|
|
let openInRemoteCommand = ''; |
|
|
let openInRemoteCommand = ''; |
|
|
let showCommitDetailsCommand = ''; |
|
|
let showCommitDetailsCommand = ''; |
|
|
if (!commit.isUncommitted) { |
|
|
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 |
|
|
message = commit.message |
|
|
// Escape markdown
|
|
|
// Escape markdown
|
|
|
.replace(escapeMarkdownRegEx, '\\$&') |
|
|
.replace(escapeMarkdownRegEx, '\\$&') |
|
@ -67,8 +70,11 @@ export class Annotations { |
|
|
.replace(/\n/g, ' \n'); |
|
|
.replace(/\n/g, ' \n'); |
|
|
message = `\n\n> ${message}`; |
|
|
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; |
|
|
markdown.isTrusted = true; |
|
|
return markdown; |
|
|
return markdown; |
|
|
} |
|
|
} |
|
|