From e389a0e9255ab898ea20a85658fc5ba6e695bb51 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 26 Mar 2024 21:11:29 +0100 Subject: feat(ods): trim spaces around the searched word --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 3afc7cc..6fe702d 100644 --- a/main.go +++ b/main.go @@ -51,7 +51,7 @@ func postIndex() http.Handler { Query: r.FormValue("query"), Invalid: true, } - query := strings.ToUpper(data.Query) + query := strings.TrimSpace(strings.ToUpper(data.Query)) for _, w := range words { if w == query { data.Invalid = false -- cgit v1.2.3