Necessary parts of mldoc are nbb compatible

Also merged in parser tests which were not running
This commit is contained in:
Gabriel Horner
2022-05-06 16:14:50 -04:00
parent 657bb09591
commit 67461aaede
16 changed files with 234 additions and 229 deletions

View File

@@ -15,8 +15,7 @@
[logseq.graph-parser.config :as gp-config]
[logseq.graph-parser.mldoc :as gp-mldoc]
[lambdaisland.glogi :as log]
[medley.core :as medley]
[frontend.format.mldoc :as mldoc]))
[medley.core :as medley]))
(defn heading-block?
[block]
@@ -166,7 +165,7 @@
(map last)
(map (fn [v]
(when (and (string? v)
(not (mldoc/link? format v)))
(not (gp-mldoc/link? format v)))
(let [v (string/trim v)
result (text/split-page-refs-without-brackets v {:un-brackets? false})]
(if (coll? result)
@@ -430,7 +429,7 @@
(if (or (:pre-block? block)
(= (:format block) :org))
content
(mldoc/remove-indentation-spaces content (inc (:level block)) false))))]
(gp-mldoc/remove-indentation-spaces content (inc (:level block)) false))))]
(if (= format :org)
content
(property/->new-properties content))))