mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 19:06:21 +00:00
Move first batch of util fns to graph-parser.util
Still need to fix external.roam
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
(ns frontend.util.priority
|
||||
(:require [clojure.string :as string]
|
||||
[frontend.util :as util]
|
||||
[logseq.graph-parser.util :as gp-util]
|
||||
[frontend.util.marker :as marker]))
|
||||
|
||||
(defn cycle-priority-state
|
||||
[content]
|
||||
(let [priority-reg #"\[#([ABC]{1})\]\s{1}"
|
||||
priority (last (util/safe-re-find priority-reg content))
|
||||
priority (last (gp-util/safe-re-find priority-reg content))
|
||||
next-priority (case priority
|
||||
"A" "B"
|
||||
|
||||
@@ -28,7 +29,7 @@
|
||||
(if-let [matches (seq (util/re-pos new-line-re-pattern content))]
|
||||
(let [[start-pos content] (last matches)]
|
||||
(+ start-pos (count content)))
|
||||
(count (util/safe-re-find re-pattern content)))
|
||||
(count (gp-util/safe-re-find re-pattern content)))
|
||||
skip-marker-pos
|
||||
(if-let [matches (seq (util/re-pos marker/bare-marker-pattern (subs content skip-hash-pos)))]
|
||||
(let [[start-pos content] (last matches)]
|
||||
|
||||
Reference in New Issue
Block a user