feat(ods): trim spaces around the searched word
This commit is contained in:
parent
4c9b51b8c6
commit
e389a0e925
1 changed files with 1 additions and 1 deletions
2
main.go
2
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
|
||||
|
|
Loading…
Add table
Reference in a new issue