Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 72fa350

Browse files
Fixing regular expression; - should be escaped
1 parent add8e9d commit 72fa350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/GitHub.App/ViewModels/GitHubPane/GitHubPaneViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,8 @@ static async Task<bool> IsValidRepository(ISimpleApiClient client)
513513

514514
static Regex CreateRoute(string route)
515515
{
516-
// Build RegEx from route (:foo to named group (?<foo>[\w_.-]+)).
517-
var routeFormat = "^" + new Regex("(:([a-z]+))\\b").Replace(route, @"(?<$2>[\w_.-]+)") + "$";
516+
// Build RegEx from route (:foo to named group (?<foo>[\w_.-=]+)).
517+
var routeFormat = "^" + new Regex("(:([a-z]+))\\b").Replace(route, @"(?<$2>[\w_.\-=]+)") + "$";
518518
return new Regex(routeFormat, RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase);
519519
}
520520
}

0 commit comments

Comments
 (0)