diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-05-10 08:29:40 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-05-10 08:29:40 +0200 |
commit | a26b7bcaa428407dd834cfa5b29429b003b1c3b4 (patch) | |
tree | e0dd57ee3d06fd91f5ce61cd69db7d45d039d8df | |
parent | b6f26c77e1e6756909e47d143ff2a1766454c475 (diff) |
messages: Keep hyphens and quotes when preprocessing query string.
-rw-r--r-- | mumi/messages.scm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mumi/messages.scm b/mumi/messages.scm index a3d279f..bc87a4e 100644 --- a/mumi/messages.scm +++ b/mumi/messages.scm @@ -230,9 +230,11 @@ Intersect the result with the id sets in the list SETS." (define-public (process-query query) "Process the QUERY string and return a list of query terms and sets that need to overlap the result set." - ;; Mu doesn't like punctuation. Replace with spaces. + ;; Mu doesn't like punctuation. Replace with spaces. Leave hyphens + ;; and quotes. (define (clean-term term) (string-map (match-lambda + ((and (or #\" #\-) c) c) ((? punctuation? c) #\space) (c c)) term)) |