소스 검색

enhance(org): replace string match with regex pattern

Tienson Qin 4 년 전
부모
커밋
c855342bbd
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/main/frontend/util/property.cljs

+ 1 - 1
src/main/frontend/util/property.cljs

@@ -284,7 +284,7 @@
         content (reduce (fn [content key]
                           (remove-property format key content)) content built-in-properties*)]
     (if (= format :org)
-      (string/replace-first content ":PROPERTIES:\n:END:\n" "")
+      (string/replace-first content (re-pattern ":PROPERTIES:\n:END:\n*") "")
       content)))
 
 (defn ->new-properties