mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 11:26:26 +00:00
fix(export): replace page-ref-id with its block/title
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
(ns frontend.worker.export
|
||||
"Export data"
|
||||
(:require [logseq.db :as ldb]
|
||||
[logseq.outliner.tree :as otree]
|
||||
(:require [datascript.core :as d]
|
||||
[frontend.db :as db]
|
||||
[frontend.worker.file.core :as worker-file]
|
||||
[datascript.core :as d]
|
||||
[logseq.graph-parser.property :as gp-property]))
|
||||
[logseq.db :as ldb]
|
||||
[logseq.graph-parser.property :as gp-property]
|
||||
[logseq.outliner.tree :as otree]))
|
||||
|
||||
(defn block->content
|
||||
"Converts a block including its children (recursively) to plain-text."
|
||||
@@ -14,7 +15,7 @@
|
||||
(if (ldb/page? (d/entity db [:block/uuid root-block-uuid]))
|
||||
0
|
||||
1))
|
||||
blocks (ldb/get-block-and-children db root-block-uuid)
|
||||
blocks (db/pull-many (keep :db/id (ldb/get-block-and-children db root-block-uuid)))
|
||||
tree (otree/blocks->vec-tree repo db blocks (str root-block-uuid))]
|
||||
(worker-file/tree->file-content repo db tree
|
||||
(assoc tree->file-opts :init-level init-level)
|
||||
|
||||
Reference in New Issue
Block a user