Forráskód Böngészése

fix: fts5 match query

Tienson Qin 3 éve
szülő
commit
4d738e7926
1 módosított fájl, 3 hozzáadás és 1 törlés
  1. 3 1
      src/electron/electron/search.cljs

+ 3 - 1
src/electron/electron/search.cljs

@@ -178,7 +178,9 @@
                             (string/replace " or " " OR ")
                             (string/replace " | " " OR ")
                             (string/replace " not " " NOT "))
-            match-input (str "\"" match-input "\"")
+            match-input (if (not= q match-input)
+                          (string/replace match-input "," "")
+                          (str "\"" match-input "\""))
             non-match-input (str "%" (string/replace q #"\s+" "%") "%")
             limit  (or limit 20)
             select "select rowid, uuid, content, page from blocks_fts where "