Bläddra i källkod

Fixes #1308 - escapes pr titles in hovers

main
Eric Amodio 3 år sedan
förälder
incheckning
72327e6c90
2 ändrade filer med 7 tillägg och 2 borttagningar
  1. +1
    -0
      CHANGELOG.md
  2. +6
    -2
      src/git/formatters/commitFormatter.ts

+ 1
- 0
CHANGELOG.md Visa fil

@ -22,6 +22,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#1308](https://github.com/eamodio/vscode-gitlens/issues/1308) - Escape quotes for PRs titles
- Fixes [#1309](https://github.com/eamodio/vscode-gitlens/issues/1309) - "Fetch" not working on remote branches
## [11.1.3] - 2021-01-05

+ 6
- 2
src/git/formatters/commitFormatter.ts Visa fil

@ -308,7 +308,9 @@ export class CommitFormatter extends Formatter {
pullRequest: { id: pr.id, provider: pr.provider, repoPath: this._item.repoPath, url: pr.url },
})} "Open Pull Request \\#${pr.id}${
Container.actionRunners.count('openPullRequest') == 1 ? ` on ${pr.provider}` : ''
}\n${GlyphChars.Dash.repeat(2)}\n${pr.title}\n${pr.state}, ${pr.formatDateFromNow()}")${separator}`;
}\n${GlyphChars.Dash.repeat(2)}\n${Strings.escapeMarkdown(pr.title).replace(/"/g, '\\"')}\n${
pr.state
}, ${pr.formatDateFromNow()}")${separator}`;
} else if (pr instanceof Promises.CancellationError) {
commands += `[$(git-pull-request) PR $(sync~spin)](command:${Commands.RefreshHover} "Searching for a Pull Request (if any) that introduced this commit...")${separator}`;
} else if (pr.provider != null && Container.config.integrations.enabled) {
@ -467,7 +469,9 @@ export class CommitFormatter extends Formatter {
pullRequest: { id: pr.id, provider: pr.provider, repoPath: this._item.repoPath, url: pr.url },
})} "Open Pull Request \\#${pr.id}${
Container.actionRunners.count('openPullRequest') == 1 ? ` on ${pr.provider}` : ''
}\n${GlyphChars.Dash.repeat(2)}\n${pr.title}\n${pr.state}, ${pr.formatDateFromNow()}")`;
}\n${GlyphChars.Dash.repeat(2)}\n${Strings.escapeMarkdown(pr.title).replace(/"/g, '\\"')}\n${
pr.state
}, ${pr.formatDateFromNow()}")`;
} else if (this._options.footnotes != null) {
const index = this._options.footnotes.size + 1;
this._options.footnotes.set(

Laddar…
Avbryt
Spara