mirror of https://github.com/logseq/logseq
fixes #11046
parent
f5bf5a4bfb
commit
10c18b165a
|
@ -2342,8 +2342,13 @@
|
|||
|
||||
(defn toggle-list-checkbox
|
||||
[{:block/keys [content] :as block} old-item-content new-item-content]
|
||||
(let [new-content (string/replace-first content old-item-content new-item-content)]
|
||||
(save-block-if-changed! block new-content)))
|
||||
(let [replace-first #(string/replace-first content % new-item-content)
|
||||
new-content (replace-first old-item-content)]
|
||||
(save-block-if-changed!
|
||||
block
|
||||
(if (= new-content content)
|
||||
(replace-first (string/replace old-item-content "[X]" "[x]"))
|
||||
new-content))))
|
||||
|
||||
(defn- dwim-in-list
|
||||
[]
|
||||
|
|
Loading…
Reference in New Issue