mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 08:26:40 +00:00
fix: importing assets for more complex blocks like paragraphs with links
Used extract-blocks to group ast blocks for each block instead of previous buggy version. Also renamed bindings that were all confusingly `block`
This commit is contained in:
committed by
Tienson Qin
parent
f318d68530
commit
501063e625
@@ -118,7 +118,11 @@
|
||||
{:user-options (merge {:convert-all-tags? false} (dissoc options :assets :verbose))
|
||||
;; asset file options
|
||||
:<read-asset <read-asset-file
|
||||
:<copy-asset #(swap! assets conj %)}
|
||||
:<copy-asset (fn copy-asset [m]
|
||||
(when-not (:block/uuid m)
|
||||
(println "[INFO]" "Asset" (pr-str (node-path/basename (:path m)))
|
||||
"does not have a :block/uuid"))
|
||||
(swap! assets conj m))}
|
||||
(select-keys options [:verbose]))]
|
||||
(gp-exporter/export-file-graph conn conn config-file *files options')))
|
||||
|
||||
@@ -167,7 +171,7 @@
|
||||
(remove #(= [{:db/ident :logseq.class/Tag}] (:block/tags %)))))
|
||||
"All classes only have :logseq.class/Tag as their tag (and don't have Page)")))
|
||||
|
||||
(deftest-async ^:focus export-basic-graph-with-convert-all-tags
|
||||
(deftest-async export-basic-graph-with-convert-all-tags
|
||||
;; This graph will contain basic examples of different features to import
|
||||
(p/let [file-graph-dir "test/resources/exporter-test-graph"
|
||||
conn (db-test/create-conn)
|
||||
|
||||
Reference in New Issue
Block a user