fix: remove content's properties when comparing with value

This commit is contained in:
Yukun Guo
2020-11-05 15:31:52 +08:00
parent 805f9bb722
commit 201ebf61a9

View File

@@ -1342,7 +1342,10 @@
(let [state (get-state state)
content (:block/content block)
value (:value state)]
(when (not= (string/trim (text/remove-level-spaces content format))
(when (not= (-> content
(text/remove-level-spaces format)
text/remove-properties!
string/trim)
(string/trim value))
(save-block! state (:value state))))
(let [block (db/pull (state/get-current-repo) '[*] [:block/uuid (uuid sibling-block-id)])]