Skip to content

Commit 053bed6

Browse files
authored
feat: normalize search (#5925)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 932360b commit 053bed6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/gallery/gallery.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,15 @@ func FindGalleryElement[T GalleryElement](models []T, name string, basePath stri
9595

9696
if !strings.Contains(name, "@") {
9797
for _, m := range models {
98-
if strings.EqualFold(m.GetName(), name) {
98+
if strings.EqualFold(strings.ToLower(m.GetName()), strings.ToLower(name)) {
9999
model = m
100100
break
101101
}
102102
}
103103

104104
} else {
105105
for _, m := range models {
106-
if strings.EqualFold(name, fmt.Sprintf("%s@%s", m.GetGallery().Name, m.GetName())) {
106+
if strings.EqualFold(strings.ToLower(name), strings.ToLower(fmt.Sprintf("%s@%s", m.GetGallery().Name, m.GetName()))) {
107107
model = m
108108
break
109109
}

0 commit comments

Comments
 (0)