Skip to content

Commit 9d2912d

Browse files
committed
fix: export urls for debug transit
1 parent 1204d1d commit 9d2912d

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

src/main/frontend/worker/export.cljs

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"Export data"
33
(:require [datascript.core :as d]
44
[logseq.cli.common.file :as common-file]
5+
[logseq.common.util :as common-util]
56
[logseq.db :as ldb]
67
[logseq.graph-parser.property :as gp-property]
78
[logseq.outliner.tree :as otree]))
@@ -47,18 +48,18 @@
4748
(defn get-debug-datoms
4849
[conn]
4950
(some->> (d/datoms @conn :eavt)
50-
(map (fn [{:keys [e a v t]}]
51-
(cond
52-
(= :url (:logseq.property/type (d/entity @conn a)))
53-
(d/datom e a "https://logseq.com" t)
51+
(keep (fn [{:keys [e a v t]}]
52+
(cond
53+
(and (= a :block/title) (common-util/url? v))
54+
(d/datom e a "https://logseq.com/debug" t)
5455

55-
(and (contains? #{:block/title :block/name} a)
56-
(let [entity (d/entity @conn e)]
57-
(and (not (:db/ident entity))
58-
(not (ldb/journal? entity))
59-
(not (:logseq.property/built-in? entity))
60-
(not (= :logseq.property/query (:db/ident (:logseq.property/created-from-property entity)))))))
61-
(d/datom e a (str "debug " e) t)
56+
(and (contains? #{:block/title :block/name} a)
57+
(let [entity (d/entity @conn e)]
58+
(and (not (:db/ident entity))
59+
(not (ldb/journal? entity))
60+
(not (:logseq.property/built-in? entity))
61+
(not (= :logseq.property/query (:db/ident (:logseq.property/created-from-property entity)))))))
62+
(d/datom e a (str "debug " e) t)
6263

63-
:else
64-
(d/datom e a v t))))))
64+
:else
65+
(d/datom e a v t))))))

0 commit comments

Comments
 (0)