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:
Gabriel Horner
2022-05-13 16:17:43 -04:00
parent b9bbd0c605
commit 5b0d5fb8b5
27 changed files with 88 additions and 83 deletions

View File

@@ -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