Skip to content

Commit 67195ef

Browse files
committed
Fixes #2850 appends template suffix
1 parent c4005d9 commit 67195ef

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1212

1313
### Fixed
1414

15+
- Fixes [#2850](https://github.com/gitkraken/vscode-gitlens/issues/2850) - For custom remotes, the URL resulting from the branches is truncated
1516
- Fixes [#2841](https://github.com/gitkraken/vscode-gitlens/issues/2841) - Error when trying to browse commits
1617
- Fixes [#2847](https://github.com/gitkraken/vscode-gitlens/issues/2847) - 14.2.0 Breaks "pull" action works fine in 14.1.1
1718

src/system/string.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,11 @@ export function interpolate(template: string, context: object | undefined): stri
393393
result += template.slice(position, token.start) + ((context as Record<string, string>)[token.key] ?? '');
394394
position = token.end;
395395
}
396+
397+
if (position < template.length) {
398+
result += template.slice(position);
399+
}
400+
396401
return result;
397402
}
398403

@@ -415,6 +420,11 @@ export async function interpolateAsync(template: string, context: object | undef
415420
result += template.slice(position, token.start) + (value ?? '');
416421
position = token.end;
417422
}
423+
424+
if (position < template.length) {
425+
result += template.slice(position);
426+
}
427+
418428
return result;
419429
}
420430

0 commit comments

Comments
 (0)