mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
fix: roam export
This commit is contained in:
17
src/main/frontend/external/roam_export.cljs
vendored
17
src/main/frontend/external/roam_export.cljs
vendored
@@ -33,14 +33,15 @@
|
||||
(into {}))))
|
||||
|
||||
(defn update-content [content uuid->uid-map]
|
||||
(let [uuids (keys uuid->uid-map)]
|
||||
(reduce
|
||||
(fn [acc uuid]
|
||||
(if (str/includes? acc (str uuid))
|
||||
(str/replace acc (str uuid) (get uuid->uid-map uuid))
|
||||
acc))
|
||||
content
|
||||
uuids)))
|
||||
(when content ; page block doesn't have content
|
||||
(let [uuids (keys uuid->uid-map)]
|
||||
(reduce
|
||||
(fn [acc uuid]
|
||||
(if (str/includes? acc (str uuid))
|
||||
(str/replace acc (str uuid) (get uuid->uid-map uuid))
|
||||
acc))
|
||||
content
|
||||
uuids))))
|
||||
|
||||
(defn update-uid [{:block/keys [uuid content] :as b}
|
||||
uuid->uid-map]
|
||||
|
||||
Reference in New Issue
Block a user