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:
parent
3a22c1f480
commit
f2cda5dd6c
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue