Browse Source

Fixes #2850 appends template suffix

main
Eric Amodio 1 year ago
parent
commit
67195ef84f
2 changed files with 11 additions and 0 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +10
    -0
      src/system/string.ts

+ 1
- 0
CHANGELOG.md View File

@ -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 View File

@ -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;
}

Loading…
Cancel
Save