mirror of
https://github.com/logseq/logseq.git
synced 2026-04-28 16:15:21 +00:00
Fix config
This commit is contained in:
@@ -6,12 +6,6 @@
|
||||
[frontend.loader :as loader]))
|
||||
|
||||
(def default-config
|
||||
(js/JSON.stringify
|
||||
#js {:toc false
|
||||
:heading_number false
|
||||
:keep_line_break false}))
|
||||
|
||||
(def config-with-line-break
|
||||
(js/JSON.stringify
|
||||
#js {:toc false
|
||||
:heading_number false
|
||||
@@ -25,7 +19,7 @@
|
||||
(parse-json content default-config))
|
||||
([content config]
|
||||
(when (loaded?)
|
||||
(.parseJson js/window.MldocOrg content config))))
|
||||
(.parseJson js/window.MldocOrg content (or config default-config)))))
|
||||
|
||||
(defn ->edn
|
||||
([content]
|
||||
@@ -34,7 +28,7 @@
|
||||
(if (string/blank? content)
|
||||
{}
|
||||
(-> content
|
||||
(parse-json config)
|
||||
(parse-json (or config default-config))
|
||||
(util/json->clj)))))
|
||||
|
||||
(defrecord OrgMode []
|
||||
|
||||
Reference in New Issue
Block a user