Przeglądaj źródła

fix: Horizontal line not created with ---

close #3416
Tienson Qin 4 lat temu
rodzic
commit
d3fa2196b0
2 zmienionych plików z 4 dodań i 3 usunięć
  1. 1 1
      package.json
  2. 3 2
      src/main/frontend/format/block.cljs

+ 1 - 1
package.json

@@ -91,7 +91,7 @@
         "ignore": "5.1.8",
         "is-svg": "4.2.2",
         "jszip": "3.5.0",
-        "mldoc": "1.2.4",
+        "mldoc": "1.2.5",
         "path": "0.12.7",
         "pixi-graph-fork": "0.1.6",
         "pixi.js": "6.2.0",

+ 3 - 2
src/main/frontend/format/block.cljs

@@ -12,7 +12,8 @@
             [frontend.util :as util]
             [frontend.util.property :as property]
             [lambdaisland.glogi :as log]
-            [medley.core :as medley]))
+            [medley.core :as medley]
+            [frontend.format.mldoc :as mldoc]))
 
 (defn heading-block?
   [block]
@@ -732,7 +733,7 @@
      (let [content (if pre-block? content
                        (str (config/get-block-pattern format) " " (string/triml content)))
            content (property/remove-properties format content)
-           ast (->> (format/to-edn content format nil)
+           ast (->> (format/to-edn content format (mldoc/default-config format))
                     (map first))
            title (when (heading-block? (first ast))
                    (:title (second (first ast))))]