瀏覽代碼

Fixes issue with whitespace collapsing in decorations

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

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

@ -109,14 +109,14 @@ export class Annotations {
}
static gutter(commit: GitCommit, format: string, dateFormatOrFormatOptions: string | null | ICommitFormatOptions, renderOptions: IRenderOptions): DecorationOptions {
const content = Strings.pad(CommitFormatter.fromTemplate(format, commit, dateFormatOrFormatOptions), 1, 1);
const message = CommitFormatter.fromTemplate(format, commit, dateFormatOrFormatOptions);
return {
renderOptions: {
before: {
...renderOptions.before,
...{
contentText: content
contentText: Strings.pad(message.replace(/ /g, GlyphChars.Space), 1, 1)
}
},
dark: {
@ -210,10 +210,11 @@ export class Annotations {
truncateMessageAtNewLine: true,
dateFormat: dateFormat
} as ICommitFormatOptions);
return {
renderOptions: {
after: {
contentText: Strings.pad(message, 1, 1)
contentText: Strings.pad(message.replace(/ /g, GlyphChars.Space), 1, 1)
},
dark: {
after: {

Loading…
取消
儲存