From eb2e4a7d23e7b9720d867347fdcd516845e7105b Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 8 Jul 2025 00:06:06 +0800 Subject: [PATCH] fix: quote wrap search when there's / --- src/main/frontend/worker/search.cljs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/frontend/worker/search.cljs b/src/main/frontend/worker/search.cljs index f35aa199f0..e6d3cd7208 100644 --- a/src/main/frontend/worker/search.cljs +++ b/src/main/frontend/worker/search.cljs @@ -137,7 +137,9 @@ DROP TRIGGER IF EXISTS blocks_au; (string/replace " | " " OR ") (string/replace " not " " NOT "))] (cond - (and (re-find #"[^\w\s]" q) (not (some #(string/includes? match-input %) ["AND" "OR" "NOT"]))) ; punctuations + (and (re-find #"[^\w\s]" q) + (or (not (some #(string/includes? match-input %) ["AND" "OR" "NOT"])) + (string/includes? q "/"))) ; punctuations (str "\"" match-input "\"*") (not= q match-input) (string/replace match-input "," "")