feat: blocks copy with options

This commit is contained in:
rcmerci
2021-07-30 16:16:48 +08:00
committed by Tienson Qin
parent 54e6f67315
commit bbb9d0fde6

View File

@@ -1074,7 +1074,10 @@
level-blocks (mapv (fn [uuid] (get level-blocks-uuid-map uuid)) block-ids*)
tree (blocks-vec->tree level-blocks)
top-level-block-uuids (mapv :block/uuid (filterv #(not (vector? %)) tree))
exported-md-contents (mapv #(export/export-blocks-as-markdown repo % "spaces" [])
exported-md-contents (mapv #(export/export-blocks-as-markdown
repo %
@frontend.components.export/*export-block-text-indent-style
(into [] @frontend.components.export/*export-block-text-remove-options))
top-level-block-uuids)]
[(string/join "\n" (mapv string/trim-newline exported-md-contents)) tree]))