Accept dash character (-) in GitHub user names when checking for Gist URL
GitHub allows dash / minus characters in usernames (e.g. "wiktor-k" or "open-keychain"). This change extends the regular expression to capture this missing character.
This commit is contained in:
@@ -192,7 +192,7 @@ public class GithubResource extends LinkedTokenResource {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Pattern p = Pattern.compile("https://gist\\.github\\.com/([a-zA-Z0-9_]+)/([0-9a-f]+)");
|
Pattern p = Pattern.compile("https://gist\\.github\\.com/([a-zA-Z0-9_-]+)/([0-9a-f]+)");
|
||||||
Matcher match = p.matcher(uri.toString());
|
Matcher match = p.matcher(uri.toString());
|
||||||
if (!match.matches()) {
|
if (!match.matches()) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user