Răsfoiți Sursa

fix: remove-property!

Tienson Qin 4 ani în urmă
părinte
comite
7de23f1397
2 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 1 1
      src/main/frontend/text.cljs
  2. 1 1
      src/test/frontend/text_test.cljs

+ 1 - 1
src/main/frontend/text.cljs

@@ -274,7 +274,7 @@
      (let [format (or format :markdown)
            key (string/lower-case (name key))
            remove-f (if first? util/remove-first remove)]
-       (if-not (and (= format :org) (contains-properties? content))
+       (if (and (= format :org) (not (contains-properties? content)))
          content
          (let [lines (->> (string/split-lines content)
                           (remove-f (fn [line]

+ 1 - 1
src/test/frontend/text_test.cljs

@@ -99,7 +99,7 @@
 
 (defn remove-id-property
   []
-  (are [x y] (= (text/remove-id-property! x) y)
+  (are [x y] (= (text/remove-id-property! :org x) y)
     "hello\n:PROPERTIES:\n:id: f9873a81-07b9-4246-b910-53a6f5ec7e04\n:END:\n"
     "hello\n:PROPERTIES:\n:END:"