fix: default markdown heading

This commit is contained in:
Konstantinos Kaloutas
2022-10-14 16:59:54 +03:00
committed by Tienson Qin
parent 2487a3fe2f
commit 3c8a9afc85

View File

@@ -3524,9 +3524,10 @@
(defn set-heading!
[block-id format heading]
(if (and (= format :markdown) (not (true? heading)))
(if (= format :markdown)
(let [repo (state/get-current-repo)
block (db/entity [:block/uuid block-id])
heading (if (true? heading) 2 heading)
content' (commands/set-markdown-heading (:block/content block) heading)]
(save-block! repo block-id content'))
(do