Closed haacked closed 5 years ago
This fixes #88. There's another PR #89 that also fixes #88. Either one will work. I think the expressions in this PR are a little easier to follow as they take advantage of some more knowledge of how GitHub URLs work. However, either PR will fix the issue.
Going to merge this and try to get some of the other open PRs / obvious bugs cleaned up. Thanks!
The current regex is too strict with regards to username and repository name. For example, the selfie button does not show up for
https://github.com/github/scientist.net/issues/new
because of the.
inscientist.net
. Also, the regex would try to match sites such as "foogithub.com". Since GitHub requires https and the browser redirects URLs with backslashes to those with forward slashes, it's safe to simplify the regex as I've done here and include thehttps://
portion in the regex.