feat: /todo/other-status and /urgent/other-priority to set property

This commit is contained in:
Tienson Qin
2024-01-19 02:35:09 +08:00
parent baa12d76dd
commit 036f1b5ab7
24 changed files with 220 additions and 106 deletions

View File

@@ -2,7 +2,7 @@
"Util fns for task priorities e.g. A, B, C"
(:require [clojure.string :as string]
[frontend.util :as util]
[frontend.util.marker :as marker]))
[frontend.handler.file-based.status :as status]))
(defn add-or-update-priority
[content format priority]
@@ -17,7 +17,7 @@
(+ start-pos (count content)))
(count (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)))]
(if-let [matches (seq (util/re-pos status/bare-marker-pattern (subs content skip-hash-pos)))]
(let [[start-pos content] (last matches)]
(+ start-pos (count content)))
0)