Merge remote-tracking branch 'upstream/master' into feat/tldraw-basic

This commit is contained in:
Peng Xiao
2022-05-16 15:57:40 +08:00
104 changed files with 2551 additions and 2176 deletions

View File

@@ -511,7 +511,7 @@
(defn compute-pos-delta-when-change-marker
[edit-content marker pos]
(let [old-marker (some->> (first (gp-util/safe-re-find marker/bare-marker-pattern edit-content))
(let [old-marker (some->> (first (util/safe-re-find marker/bare-marker-pattern edit-content))
(string/trim))
pos-delta (- (count marker)
(count old-marker))
@@ -536,7 +536,7 @@
(if-let [matches (seq (util/re-pos new-line-re-pattern prefix))]
(let [[start-pos content] (last matches)]
(+ start-pos (count content)))
(count (gp-util/safe-re-find re-pattern prefix))))
(count (util/safe-re-find re-pattern prefix))))
new-value (str (subs edit-content 0 pos)
(string/replace-first (subs edit-content pos)
(marker/marker-pattern format)
@@ -577,7 +577,7 @@
(let [edit-content (gobj/get current-input "value")
heading-pattern #"^#+\s+"
new-value (cond
(gp-util/safe-re-find heading-pattern edit-content)
(util/safe-re-find heading-pattern edit-content)
(string/replace-first edit-content
heading-pattern
(str heading " "))