mirror of https://github.com/logseq/logseq
enhance(search): only show new file when ext matched
parent
4cd2627892
commit
c2b0576eb0
|
@ -52,7 +52,9 @@
|
|||
[{:keys [pages files blocks]} search-q]
|
||||
(rum/with-context [[t] i18n/*tongue-context*]
|
||||
(let [new-page [{:type :new-page}]
|
||||
new-file [{:type :new-file}]
|
||||
new-file (when-let [ext (util/get-file-ext search-q)]
|
||||
(when (contains? config/mldoc-support-formats (keyword (string/lower-case ext)))
|
||||
[{:type :new-file}]))
|
||||
pages (map (fn [page] {:type :page :data page}) pages)
|
||||
files (map (fn [file] {:type :file :data file}) files)
|
||||
blocks (map (fn [block] {:type :block :data block}) blocks)
|
||||
|
|
Loading…
Reference in New Issue