fix: roam export

pull/7641/head
Tienson Qin 2022-12-08 21:15:47 +08:00
parent 7a5310eb5d
commit 4708e6067d
1 changed files with 9 additions and 8 deletions

View File

@ -33,14 +33,15 @@
(into {})))) (into {}))))
(defn update-content [content uuid->uid-map] (defn update-content [content uuid->uid-map]
(let [uuids (keys uuid->uid-map)] (when content ; page block doesn't have content
(reduce (let [uuids (keys uuid->uid-map)]
(fn [acc uuid] (reduce
(if (str/includes? acc (str uuid)) (fn [acc uuid]
(str/replace acc (str uuid) (get uuid->uid-map uuid)) (if (str/includes? acc (str uuid))
acc)) (str/replace acc (str uuid) (get uuid->uid-map uuid))
content acc))
uuids))) content
uuids))))
(defn update-uid [{:block/keys [uuid content] :as b} (defn update-uid [{:block/keys [uuid content] :as b}
uuid->uid-map] uuid->uid-map]