From ced50c448299cf9df206f84b5b589238fc4c3f6d Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Tue, 11 May 2021 22:23:26 +0800 Subject: [PATCH] fix: the next block might inherits block attributes from the previous block --- src/main/frontend/handler/editor.cljs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/frontend/handler/editor.cljs b/src/main/frontend/handler/editor.cljs index 8729c30a2..b2e3f0301 100644 --- a/src/main/frontend/handler/editor.cljs +++ b/src/main/frontend/handler/editor.cljs @@ -469,9 +469,8 @@ current-block (wrap-parse-block current-block) new-m {:block/uuid (db/new-block-id) :block/content snd-block-text} - next-block (-> (merge block new-m) - (dissoc :db/id :block/properties :block/pre-block? :block/meta - :block/heading-level :block/type) + next-block (-> (merge (select-keys block [:block/parent :block/left :block/format + :block/page :block/level :block/file :block/journal?]) new-m) (wrap-parse-block)) {:keys [sibling? blocks]} (profile "outliner insert block"