浏览代码

fix: no need to clean content for db graphs

Tienson Qin 2 年之前
父节点
当前提交
cef72a1463
共有 1 个文件被更改,包括 6 次插入4 次删除
  1. 6 4
      src/main/frontend/handler/editor.cljs

+ 6 - 4
src/main/frontend/handler/editor.cljs

@@ -1264,10 +1264,12 @@
 
 
 (defn- clean-content!
 (defn- clean-content!
   [repo format content]
   [repo format content]
-  (->> (text/remove-level-spaces content format (config/get-block-pattern format))
-       (drawer/remove-logbook)
-       (file-property/remove-properties-when-file-based repo format)
-       string/trim))
+  (if (config/db-based-graph? repo)
+    content
+    (some->> (text/remove-level-spaces content format (config/get-block-pattern format))
+             (drawer/remove-logbook)
+             (file-property/remove-properties-when-file-based repo format)
+             string/trim)))
 
 
 (defn insert-command!
 (defn insert-command!
   [id command-output format {:keys [restore?]
   [id command-output format {:keys [restore?]