Skip to content

Commit

Permalink
Fixes #33 (again) - commit messages rendered as markdown in hovers
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Dec 12, 2018
1 parent 717e24b commit 9912558
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed

- Fixes an issue where gravatar icons would sometimes not show up — thanks to [PR #579](https://github.com/eamodio/vscode-gitlens/pull/579) by sgtwilko ([@sgtwilko](https://github.com/sgtwilko))
- Fixes [#33](https://github.com/eamodio/vscode-gitlens/issues/33) — Commit messages can causes markdown formatting in hovers
- Fixes [#501](https://github.com/eamodio/vscode-gitlens/issues/501) — Azure DevOps ssh remotes aren't handled properly
- Fixes [#523](https://github.com/eamodio/vscode-gitlens/issues/523) — File History doesn't show all commits on file
- Fixes [#552](https://github.com/eamodio/vscode-gitlens/issues/552) — "Open Line Changes with..." doesn't work for renamed files
Expand Down
5 changes: 2 additions & 3 deletions src/annotations/annotations.ts
Expand Up @@ -151,14 +151,13 @@ export class Annotations {
break;
}

message
message = `\n\n> ${message
// Escape markdown
.replace(escapeMarkdownRegex, '\\$&')
// Escape markdown header (since the above regex won't match it)
.replace(/^===/gm, markdownHeaderReplacement)
// Keep under the same block-quote
.replace(/\n/g, ' \n');
message = `\n\n> ${message}`;
.replace(/\n/g, '\n> ')}`;
}
else {
showCommitDetailsCommand = `\`${commit.shortSha === 'Working Tree' ? '00000000' : commit.shortSha}\``;
Expand Down

0 comments on commit 9912558

Please sign in to comment.