mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 19:06:21 +00:00
fix: templates with bullet will auto duplicate
Related to #1141 and #1123
This commit is contained in:
@@ -606,6 +606,14 @@
|
||||
(when chan {:chan chan
|
||||
:chan-callback chan-callback})))
|
||||
|
||||
;; fix editing template with multiple headings
|
||||
(when (> (count blocks) 1)
|
||||
(let [new-value (-> (text/remove-level-spaces (:block/content (first blocks)) (:block/format (first blocks)))
|
||||
(string/trim-newline))
|
||||
edit-input-id (state/get-edit-input-id)]
|
||||
(when edit-input-id
|
||||
(state/set-edit-content! edit-input-id new-value))))
|
||||
|
||||
(when (or (seq retract-refs) pre-block?)
|
||||
(ui-handler/re-render-root!))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user