Block references wip

This commit is contained in:
Tienson Qin
2020-05-16 15:15:34 +08:00
parent 009f2df553
commit 3d439d62e9
10 changed files with 175 additions and 66 deletions

View File

@@ -48,6 +48,12 @@
(vector? block)
(= "Timestamp" (first block))))
(defn- properties-block?
[block]
(and
(vector? block)
(= "Property_Drawer" (first block))))
(defn- paragraph-timestamp-block?
[block]
(and (paragraph-block? block)

View File

@@ -26,11 +26,14 @@
(defn ->edn
[content config]
(if (string/blank? content)
{}
(-> content
(parse-json config)
(util/json->clj))))
(try
(if (string/blank? content)
{}
(-> content
(parse-json config)
(util/json->clj)))
(catch js/Error _e
[])))
(defrecord MldocMode []
protocol/Format