Fix caps in search leading to no results

This commit is contained in:
morganamilo 2021-10-04 21:51:18 +01:00 committed by J Guerreiro
parent b2a728151e
commit 1a0cfd85f2

View file

@ -136,7 +136,11 @@ func narrowSearch(ctx context.Context, aurClient *aur.Client, pkgS []string, sor
continue
}
if !(strings.Contains(r[i].Name, pkgN) || strings.Contains(strings.ToLower(r[i].Description), pkgN)) {
name := strings.ToLower(r[i].Name)
desc := strings.ToLower(r[i].Description)
targ := strings.ToLower(pkgN)
if !(strings.Contains(name, targ) || strings.Contains(desc, targ)) {
match = false
break