Git - don't use look-behind regex (#236447)

pull/236454/head
Ladislau Szomoru 2024-12-18 10:35:16 +01:00 committed by GitHub
parent 3daa33e93a
commit 224ade93d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ export class Git {
const repoUri = Uri.file(repositoryRootPath);
const pathUri = Uri.file(pathInsidePossibleRepository);
if (repoUri.authority.length !== 0 && pathUri.authority.length === 0) {
const match = /(?<=^\/?)([a-zA-Z])(?=:\/)/.exec(pathUri.path);
const match = /^[\/]?([a-zA-Z])[:\/]/.exec(pathUri.path);
if (match !== null) {
const [, letter] = match;