Przeglądaj źródła

fix: quote wrap search when there's /

Tienson Qin 6 miesięcy temu
rodzic
commit
eb2e4a7d23
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      src/main/frontend/worker/search.cljs

+ 3 - 1
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 "," "")