fix: Horizontal line not created with ---

close #3416
This commit is contained in:
Tienson Qin
2021-12-11 14:09:17 +08:00
parent ae89f9970b
commit d3fa2196b0
2 changed files with 4 additions and 3 deletions

View File

@@ -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",

View File

@@ -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))))]