ignore case when matching bangs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
896e270847
commit
f6d3df8420
|
@ -56,9 +56,13 @@ func parseBang(searchQuery string) (bang string, query string) {
|
||||||
endBang := regexEndBang.FindSubmatch([]byte(searchQuery))
|
endBang := regexEndBang.FindSubmatch([]byte(searchQuery))
|
||||||
|
|
||||||
if len(endBang) == 3 {
|
if len(endBang) == 3 {
|
||||||
return string(endBang[2]), string(endBang[1])
|
bang = strings.ToLower(string(endBang[2]))
|
||||||
|
query = string(endBang[1])
|
||||||
|
return
|
||||||
} else if len(startBang) == 3 {
|
} else if len(startBang) == 3 {
|
||||||
return string(startBang[1]), string(startBang[2])
|
bang = strings.ToLower(string(startBang[1]))
|
||||||
|
query = string(startBang[2])
|
||||||
|
return
|
||||||
} else {
|
} else {
|
||||||
return "", searchQuery
|
return "", searchQuery
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue