fix: blanks deleted when paste

This commit is contained in:
Tienson Qin
2022-06-05 13:57:37 +08:00
parent e36bca4660
commit 5ce106813a

View File

@@ -2921,8 +2921,7 @@
:else
;; from external
(let [format (or (db/get-page-format (state/get-current-page)) :markdown)
text (string/trim text)]
(let [format (or (db/get-page-format (state/get-current-page)) :markdown)]
(match [format
(nil? (util/safe-re-find #"(?m)^\s*(?:[-+*]|#+)\s+" text))
(nil? (util/safe-re-find #"(?m)^\s*\*+\s+" text))