diff --git a/src/main/frontend/handler/export.cljs b/src/main/frontend/handler/export.cljs index 4aaa59fad..c034b91f3 100644 --- a/src/main/frontend/handler/export.cljs +++ b/src/main/frontend/handler/export.cljs @@ -444,6 +444,16 @@ x)) vec-tree)) +(defn- keyword-with-commas->str + [block] + (update block :block/properties + (fn [properties] + (when (seq properties) + (update-keys properties (fn [k] + (if (string/includes? (str k) ",") + (subs (str k) 1) + k))))))) + (defn- blocks [db] {:version 1 :blocks @@ -460,12 +470,14 @@ name {:transform? false}) blocks' (map (fn [b] - (if (seq (:block/properties b)) - (update b :block/content - (fn [content] (property/remove-properties (:block/format b) content))) - b)) blocks) - children (outliner-tree/blocks->vec-tree blocks' name)] - (assoc page :block/children children)))) + (let [b' (if (seq (:block/properties b)) + (update b :block/content + (fn [content] (property/remove-properties (:block/format b) content))) + b)] + (keyword-with-commas->str b'))) blocks) + children (outliner-tree/blocks->vec-tree blocks' name) + page' (keyword-with-commas->str page)] + (assoc page' :block/children children)))) (nested-select-keys [:block/id :block/page-name diff --git a/src/main/frontend/handler/external.cljs b/src/main/frontend/handler/external.cljs index f112b3444..c582d5846 100644 --- a/src/main/frontend/handler/external.cljs +++ b/src/main/frontend/handler/external.cljs @@ -203,7 +203,7 @@ (catch :default e (js/console.error e) (notification/show! - (str (:message e)) + (str (.-message e)) :error)))) ;; it was designed to accept a list of imported page names but now deprecated (defn tree-vec-translate-json