Prechádzať zdrojové kódy

Fix/markdown heading export (#9967)

* fix: top heading if it's the first block
Tienson Qin 2 rokov pred
rodič
commit
e40f595a1d
1 zmenil súbory, kde vykonal 4 pridanie a 2 odobranie
  1. 4 2
      src/main/frontend/modules/file/core.cljs

+ 4 - 2
src/main/frontend/modules/file/core.cljs

@@ -48,8 +48,10 @@
                     (str content "\n"))
 
                   :else
-                  (let [markdown-top-heading? (and markdown?
-                                                   (= parent page)
+                  (let [
+                        ;; first block is a heading, Markdown users prefer to remove the `-` before the content
+                        markdown-top-heading? (and markdown?
+                                                   (= parent page left)
                                                    heading)
                         [prefix spaces-tabs]
                         (cond