Ver código fonte

Revert "Trim whitespaces for org mode files too"

This reverts commit 3fd7492e0ab90fc1d4890ea4b4005743cbbe0856.
Tienson Qin 2 anos atrás
pai
commit
6cbbd66333

+ 3 - 2
deps/graph-parser/src/logseq/graph_parser/block.cljs

@@ -399,7 +399,8 @@
                                   (:start_pos meta)))
         content (when content
                   (let [content (text/remove-level-spaces content format block-pattern)]
-                    (if (:pre-block? block)
+                    (if (or (:pre-block? block)
+                            (= (:format block) :org))
                       content
                       (gp-mldoc/remove-indentation-spaces content (inc (:level block)) false))))]
     (if (= format :org)
@@ -613,7 +614,7 @@
                                                (str (gp-property/colons-org "id") " " (:block/uuid block)))))]
                            (string/replace-first c replace-str ""))))))
 
-(defn block-exists-in-another-page?
+(defn block-exists-in-another-page? 
   "For sanity check only.
    For renaming file externally, the file is actually deleted and transacted before-hand."
   [db block-uuid current-page-name]