diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e9e891..3792009 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/src/system/string.ts b/src/system/string.ts index 0237f48..d35bec3 100644 --- a/src/system/string.ts +++ b/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)[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; }