fix: fix extension-check logic when normalizing github URLs (#158)

This commit is contained in:
Daniel Moran
2021-06-29 14:49:41 -04:00
committed by GitHub
parent 93d628dd04
commit eb99827966
3 changed files with 9 additions and 3 deletions

View File

@ -37,7 +37,7 @@ func NormalizeURLToContent(u *url.URL, extensions ...string) *url.URL {
func extensionMatches(u *url.URL, extensions []string) bool {
ext := path.Ext(u.Path)
for _, e := range extensions {
if strings.EqualFold(e, "."+ext) {
if strings.EqualFold(ext, e) {
return true
}
}