allow page's block/content to be it's original name

This commit is contained in:
Tienson Qin
2023-08-16 01:09:48 +08:00
parent 14289b99ab
commit 58fc4bca28
5 changed files with 8 additions and 4 deletions

View File

@@ -90,6 +90,7 @@ and handles unexpected failure."
:or {with-id? true}}]
(when-not (string/blank? content)
(let [block (dissoc block :block/pre-block?)
format (or format :markdown)
ast (format/to-edn content format nil)
blocks (extract-blocks ast content format {:with-id? with-id?})
new-block (first blocks)