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

@@ -14,8 +14,7 @@
[frontend.db.rules :as rules]
[frontend.template :as template]
[logseq.graph-parser.text :as text]
[frontend.util :as util]
[logseq.graph-parser.util :as gp-util]))
[frontend.util :as util]))
;; Query fields:
@@ -449,7 +448,7 @@ Some bindings in this fn:
(remove string/blank?)
(map (fn [x]
(if (or (contains? #{"+" "-"} (first x))
(and (gp-util/safe-re-find #"\d" (first x))
(and (util/safe-re-find #"\d" (first x))
(some #(string/ends-with? x %) ["y" "m" "d" "h" "min"])))
(keyword (name x))
x)))