From 717e6b4fafbfe7dc803624458b0fd33f4eda704f Mon Sep 17 00:00:00 2001 From: leo Date: Tue, 21 May 2024 14:35:14 +0800 Subject: [PATCH] enhance: a more adaptable regular expression for remote URLs (#136) --- src/Models/Remote.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Models/Remote.cs b/src/Models/Remote.cs index e3eaf36d..c1cce340 100644 --- a/src/Models/Remote.cs +++ b/src/Models/Remote.cs @@ -6,9 +6,9 @@ namespace SourceGit.Models { [GeneratedRegex(@"^http[s]?://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/]+/[\w\-\.]+\.git$")] private static partial Regex REG_HTTPS(); - [GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-]+/[\w\-\.]+\.git$")] + [GeneratedRegex(@"^[\w\-]+@[\w\.\-]+(\:[0-9]+)?:[\w\-/]+/[\w\-\.]+\.git$")] private static partial Regex REG_SSH1(); - [GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-]+/[\w\-\.]+\.git$")] + [GeneratedRegex(@"^ssh://([\w\-]+@)?[\w\.\-]+(\:[0-9]+)?/[\w\-/]+/[\w\-\.]+\.git$")] private static partial Regex REG_SSH2(); private static readonly Regex[] URL_FORMATS = [