Skip to content

Commit

Permalink
make everything lowercase, before we search for it
Browse files Browse the repository at this point in the history
  • Loading branch information
knoxfighter committed Jul 4, 2020
1 parent 79b4987 commit 6236e5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions fwew.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ func TranslateFromNavi(searchNaviWord string) (results []Word, err error) {
searchNaviWord = strings.ReplaceAll(searchNaviWord, "’", "'")
searchNaviWord = strings.ReplaceAll(searchNaviWord, "‘", "'")

// find everything lowercase
searchNaviWord = strings.ToLower(searchNaviWord)

// No Results if empty string after removing sketch chars
if len(searchNaviWord) == 0 {
return
Expand Down
4 changes: 2 additions & 2 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func List(args []string) (results []Word, err error) {

func listWords(args []string, words []Word) (results []Word, err error) {
var (
what = args[0]
cond = args[1]
what = strings.ToLower(args[0])
cond = strings.ToLower(args[1])
spec = strings.ToLower(args[2])
)

Expand Down

0 comments on commit 6236e5d

Please sign in to comment.