浏览代码

Fixes #2850 appends template suffix

main
Eric Amodio 1年前
父节点
当前提交
67195ef84f
共有 2 个文件被更改,包括 11 次插入0 次删除
  1. +1
    -0
      CHANGELOG.md
  2. +10
    -0
      src/system/string.ts

+ 1
- 0
CHANGELOG.md 查看文件

@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#2850](https://github.com/gitkraken/vscode-gitlens/issues/2850) - For custom remotes, the URL resulting from the branches is truncated
- Fixes [#2841](https://github.com/gitkraken/vscode-gitlens/issues/2841) - Error when trying to browse commits
- Fixes [#2847](https://github.com/gitkraken/vscode-gitlens/issues/2847) - 14.2.0 Breaks "pull" action works fine in 14.1.1

+ 10
- 0
src/system/string.ts 查看文件

@ -393,6 +393,11 @@ export function interpolate(template: string, context: object | undefined): stri
result += template.slice(position, token.start) + ((context as Record<string, string>)[token.key] ?? '');
position = token.end;
}
if (position < template.length) {
result += template.slice(position);
}
return result;
}
@ -415,6 +420,11 @@ export async function interpolateAsync(template: string, context: object | undef
result += template.slice(position, token.start) + (value ?? '');
position = token.end;
}
if (position < template.length) {
result += template.slice(position);
}
return result;
}

正在加载...
取消
保存