mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-21 15:53:32 +01:00
Fix error when searching for just a literal colon
This commit is contained in:
parent
9a06b07b74
commit
f64e466472
@ -852,6 +852,9 @@ func parseNonAtomizedToken(token string) (string, any, any, any, error) {
|
||||
|
||||
func parseAtomizedToken(ctx context.Context, token string) (string, any, any, error) {
|
||||
splitToken := splitEscaped(token, ':', 2)
|
||||
if len(splitToken) != 2 {
|
||||
return "", nil, nil, fmt.Errorf("search query contains malformed search atom '%s'", token)
|
||||
}
|
||||
field := unescape(splitToken[0])
|
||||
val := unescape(splitToken[1])
|
||||
switch field {
|
||||
|
Loading…
Reference in New Issue
Block a user