Move first batch of util fns to graph-parser.util

Still need to fix external.roam
This commit is contained in:
Gabriel Horner
2022-05-03 16:59:41 -04:00
parent af4b55c870
commit 85bd1fecb2
43 changed files with 211 additions and 166 deletions

View File

@@ -20,6 +20,7 @@
[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]))
@@ -32,7 +33,7 @@
lc-content (util/search-normalize content)
lc-q (util/search-normalize q)]
(if (and (string/includes? lc-content lc-q)
(not (util/safe-re-find #" " q)))
(not (gp-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