Skip to content

Commit

Permalink
fix: don't export id property for db graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Jan 22, 2024
1 parent 6725c83 commit 4698d8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/main/frontend/handler/export/common.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
[malli.util :as mu]
[promesa.core :as p]
[frontend.persist-db.browser :as db-browser]
[cljs-bean.core :as bean]
[frontend.worker.export :as worker-export]
[clojure.edn :as edn]))

Expand Down
9 changes: 5 additions & 4 deletions src/main/frontend/worker/file/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
[datascript.core :as d]
[logseq.db :as ldb]
[frontend.worker.date :as worker-date]
[frontend.worker.util :as worker-util]))
[frontend.worker.util :as worker-util]
[logseq.db.sqlite.util :as sqlite-util]))

(defonce *writes (atom {}))
(defonce *request-id (atom 0))
Expand Down Expand Up @@ -44,7 +45,8 @@
(defn transform-content
[repo db {:block/keys [collapsed? format pre-block? content left page parent properties] :as b} level {:keys [heading-to-list?]} context]
(let [block-ref-not-saved? (and (seq (:block/_refs (d/entity db (:db/id b))))
(not (string/includes? content (str (:block/uuid b)))))
(not (string/includes? content (str (:block/uuid b))))
(not (sqlite-util/db-based-graph? repo)))
heading (:heading properties)
markdown? (= :markdown format)
content (or content "")
Expand All @@ -58,8 +60,7 @@
(str content "\n"))

:else
(let [
;; first block is a heading, Markdown users prefer to remove the `-` before the content
(let [;; first block is a heading, Markdown users prefer to remove the `-` before the content
markdown-top-heading? (and markdown?
(= parent page left)
heading)
Expand Down

0 comments on commit 4698d8c

Please sign in to comment.