File tree Expand file tree Collapse file tree 2 files changed +21
-17
lines changed
outliner/src/logseq/outliner Expand file tree Collapse file tree 2 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 199199 :as opts}]
200200 (if-let [children (sort-by-order
201201 (if include-property-block?
202- (entity-plus/lookup-kv-then-entity entity :block/_raw-parent )
202+ (let [children (entity-plus/lookup-kv-then-entity entity :block/_raw-parent )]
203+ (concat children
204+ (keep (fn [c] (:logseq.property/query c)) children)))
203205 (entity-plus/lookup-kv-then-entity entity :block/_parent )))]
204206 (cons entity (mapcat #(get-block-and-children-aux % opts) children))
205207 [entity]))
Original file line number Diff line number Diff line change 795795 :or {update-timestamps? true }}]
796796 {:pre [(seq blocks)
797797 (m/validate block-map-or-entity target-block)]}
798- (let [blocks (keep (fn [b]
799- (if-let [eid (or (:db/id b)
800- (when-let [id (:block/uuid b)]
801- [:block/uuid id]))]
802- (let [b' (if-let [e (if (de/entity? b) b (d/entity db eid))]
803- (merge
804- (into {} e)
805- {:db/id (:db/id e)
806- :block/title (or (:block/raw-title e) (:block/title e))}
798+ (let [blocks (->>
799+ (keep (fn [b]
800+ (if-let [eid (or (:db/id b)
801+ (when-let [id (:block/uuid b)]
802+ [:block/uuid id]))]
803+ (let [b' (if-let [e (if (de/entity? b) b (d/entity db eid))]
804+ (merge
805+ (into {} e)
806+ {:db/id (:db/id e)
807+ :block/title (or (:block/raw-title e) (:block/title e))}
808+ b)
807809 b)
808- b)
809- dissoc-keys ( concat [ :block/tx-id ]
810- ( when ( contains? #{ :insert-template-blocks :paste } outliner-op)
811- [ :block/refs ]))]
812- ( apply dissoc b' dissoc-keys ))
813- b) )
814- blocks )
810+ dissoc-keys ( concat [ :block/tx-id ]
811+ ( when ( contains? #{ :insert-template-blocks :paste } outliner-op)
812+ [ :block/refs ]))]
813+ ( apply dissoc b' dissoc-keys))
814+ b ))
815+ blocks )
816+ ( remove ldb/asset?) )
815817 [target-block sibling?] (get-target-block db blocks target-block opts)
816818 _ (assert (some? target-block) (str " Invalid target: " target-block))
817819 replace-empty-target? (if (and (some? replace-empty-target?)
You can’t perform that action at this time.
0 commit comments