|
|
@ -16,16 +16,15 @@ func TSQueryFromSearch(search string) string { |
|
|
|
clearQuotes := false |
|
|
|
startQuotes := false |
|
|
|
|
|
|
|
if strings.HasPrefix(token, "\"") { |
|
|
|
if len(token) > 1 { |
|
|
|
token = token[1:] |
|
|
|
} |
|
|
|
if strings.HasPrefix(token, "\"") && len(token) > 1 { |
|
|
|
startQuotes = true |
|
|
|
} |
|
|
|
if strings.HasSuffix(token, "\"") { |
|
|
|
token = token[:len(token)-1] |
|
|
|
if !startQuotes { |
|
|
|
clearQuotes = true |
|
|
|
} |
|
|
|
|
|
|
|
startQuotes = false |
|
|
|
clearQuotes = true |
|
|
|
} |
|
|
|
|
|
|
|
token := strings.Trim(token, ",.;:()\"") |
|
|
|