mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 00:46:23 +00:00
Heading edit
This commit is contained in:
@@ -53,12 +53,12 @@
|
||||
|
||||
;; TODO create a dummy heading if no headings exists
|
||||
(defn extract-headings
|
||||
[blocks]
|
||||
[blocks last-pos]
|
||||
(loop [headings []
|
||||
heading-children []
|
||||
blocks (reverse blocks)
|
||||
timestamps {}
|
||||
last-pos nil]
|
||||
last-pos last-pos]
|
||||
(if (seq blocks)
|
||||
(let [block (first blocks)
|
||||
level (:level (second block))]
|
||||
|
||||
@@ -28,12 +28,14 @@
|
||||
(.parseJson js/window.MldocOrg content config))))
|
||||
|
||||
(defn ->clj
|
||||
[content]
|
||||
(if (string/blank? content)
|
||||
{}
|
||||
(-> content
|
||||
(parse-json)
|
||||
(util/json->clj))))
|
||||
([content]
|
||||
(->clj content default-config))
|
||||
([content config]
|
||||
(if (string/blank? content)
|
||||
{}
|
||||
(-> content
|
||||
(parse-json config)
|
||||
(util/json->clj)))))
|
||||
|
||||
(defn inline-list->html
|
||||
[json]
|
||||
|
||||
Reference in New Issue
Block a user