chore: auto heading based on level

This commit is contained in:
Konstantinos Kaloutas
2022-10-14 13:43:50 +03:00
committed by Tienson Qin
parent 207c9575a5
commit 2487a3fe2f
3 changed files with 4 additions and 4 deletions

View File

@@ -1883,7 +1883,7 @@
(declare block-content)
(defn build-block-title
[config {:block/keys [title marker pre-block? properties]
[config {:block/keys [title marker pre-block? properties level]
:as t}]
(let [config (assoc config :block t)
slide? (boolean (:slide? config))
@@ -1907,7 +1907,7 @@
(<= heading-level 6)
heading-level)
(:heading properties))
heading (if (true? heading) 2 heading)
heading (if (true? heading) (min level 6) heading)
elem (if heading
(keyword (str "h" heading
(when block-ref? ".inline")))