enhance: use search normalize

This commit is contained in:
Junyi Du
2022-01-10 14:12:53 +08:00
committed by Tienson Qin
parent 0fd86fd691
commit ebd8e94c23
5 changed files with 16 additions and 8 deletions

View File

@@ -1785,6 +1785,7 @@
(text/wrapped-by? value pos before end)))))
(defn get-matched-pages
"Return matched page names"
[q]
(let [block (state/get-edit-block)
editing-page (and block
@@ -1793,7 +1794,7 @@
pages (search/page-search q 20)]
(if editing-page
;; To prevent self references
(remove (fn [p] (= (string/lower-case p) editing-page)) pages)
(remove (fn [p] (= (util/page-name-sanity-lc p) editing-page)) pages)
pages)))
(defn get-matched-blocks