mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 10:26:35 +00:00
Decouple graph-parser util from app util usage
For tiny util heavily used fns like safe-re-find and uuid-string?, decouple graph-parser from so much of the app
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
[clojure.string :as string]
|
||||
[frontend.context.i18n :refer [t]]
|
||||
[frontend.date :as date]
|
||||
[logseq.graph-parser.util :as gp-util]
|
||||
[reitit.frontend.easy :as rfe]
|
||||
[frontend.modules.shortcut.core :as shortcut]))
|
||||
|
||||
@@ -33,7 +32,7 @@
|
||||
lc-content (util/search-normalize content)
|
||||
lc-q (util/search-normalize q)]
|
||||
(if (and (string/includes? lc-content lc-q)
|
||||
(not (gp-util/safe-re-find #" " q)))
|
||||
(not (util/safe-re-find #" " q)))
|
||||
(let [i (string/index-of lc-content lc-q)
|
||||
[before after] [(subs content 0 i) (subs content (+ i (count q)))]]
|
||||
[:div
|
||||
|
||||
Reference in New Issue
Block a user