fix: get-block-and-children

This commit is contained in:
Tienson Qin
2021-04-05 14:14:44 +08:00
parent da43e43603
commit 10f7f078f7
5 changed files with 94 additions and 174 deletions

View File

@@ -79,16 +79,6 @@
block)]
(apply util/join-newline @contents))))
;; with children content
(defn get-block-full-content
([repo block-id]
(get-block-full-content repo block-id (fn [block] (:block/content block))))
([repo block-id transform-fn]
(let [blocks (db/get-block-and-children-no-cache repo block-id)]
(->> blocks
(map transform-fn)
(apply util/join-newline)))))
(defn get-block-end-pos-rec
[repo block]
(let [children (:block/children block)]