Browse Source

Trim whitespaces for org mode files too

Tienson Qin 2 years ago
parent
commit
54706785c3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      deps/graph-parser/src/logseq/graph_parser/block.cljs

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

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