Explorar o código

fix: default markdown heading

Konstantinos Kaloutas %!s(int64=3) %!d(string=hai) anos
pai
achega
21a575789c
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/main/frontend/handler/editor.cljs

+ 2 - 1
src/main/frontend/handler/editor.cljs

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