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

Commit 9bf1d33

Browse files
authored
Merge pull request #1377 from github/fixes/1376-githubpane-url-regex
Relax the GitHub pane URL regex.
2 parents 6706649 + 3254a4f commit 9bf1d33

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
@@ -402,8 +402,8 @@ static async Task<bool> IsValidRepository(ISimpleApiClient client)
402402

403403
static Regex CreateRoute(string route)
404404
{
405-
// Build RegEx from route (:foo to named group (?<foo>[a-z0-9]+)).
406-
var routeFormat = new Regex("(:([a-z]+))\\b").Replace(route, "(?<$2>[a-z0-9]+)");
405+
// Build RegEx from route (:foo to named group (?<foo>[\w_.-]+)).
406+
var routeFormat = new Regex("(:([a-z]+))\\b").Replace(route, @"(?<$2>[\w_.-]+)");
407407
return new Regex(routeFormat, RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase);
408408
}
409409
}

0 commit comments

Comments
 (0)