Repos / gorts / 93fd364727
commit 93fd3647276ee88ac9fd5ab53c10ae3c90dd14c0
Author: Nhân <hi@imnhan.com>
Date: Tue Jun 20 15:24:47 2023 +0700
fix player MatchesName logic
idk wtf I was thinking
diff --git a/players/players.go b/players/players.go
index e68be90..18b7895 100644
--- a/players/players.go
+++ b/players/players.go
@@ -55,5 +55,5 @@ func normalize(in string) (out string) {
}
func (p *Player) MatchesName(query string) bool {
- return normalize(query) == normalize(p.Name)
+ return strings.Contains(normalize(p.Name), normalize(query))
}