Merge pull request #2190 from wiktor-k/master

Accept dash character (-) in GitHub user names when checking for Gist URL
This commit is contained in:
Dominik Schürmann
2017-10-20 13:02:16 +02:00
committed by GitHub

View File

@@ -192,7 +192,7 @@ public class GithubResource extends LinkedTokenResource {
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());
if (!match.matches()) {
return null;