فهرست منبع

Merge pull request #2228 from logseq/fix/copy-blocks-format-err

fix: copy a heading and sub bullets (replaces tabs and dashes by #)
icremcr 4 سال پیش
والد
کامیت
46b37d760b
1فایلهای تغییر یافته به همراه3 افزوده شده و 5 حذف شده
  1. 3 5
      src/main/frontend/handler/editor.cljs

+ 3 - 5
src/main/frontend/handler/editor.cljs

@@ -1004,11 +1004,9 @@
         contents
         (mapv (fn [block]
                 (let [header
-                      (if (and unordered? (= format :markdown))
-                        (str (string/join (repeat (- (:level block) 1) "  ")) "-")
-                        (let [header-char (if (= format :markdown) "#" "*")
-                              init-char (if (= format :markdown) "##" "*")]
-                          (str (string/join (repeat (:level block) header-char)) init-char)))]
+                      (if (= format :markdown)
+                        (str (string/join (repeat (- (:level block) 1) "\t")) "-")
+                        (string/join (repeat (:level block) "*")))]
                   (str header " " (:block/content block) "\n")))
               level-blocks)
         content-without-properties