mirror of
https://github.com/logseq/logseq.git
synced 2026-04-27 15:45:00 +00:00
enhance: add mldoc ast schema (#8829)
* enhance: add mldoc ast schema * Add bb task to validate mldoc Also move mldoc schema to make room for other schemas --------- Co-authored-by: Gabriel Horner <gabriel@logseq.com> Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
[frontend.handler.export.common :as common :refer
|
||||
[*state* indent newline* raw-text simple-ast-malli-schema
|
||||
simple-asts->string space]]
|
||||
[logseq.graph-parser.schema.mldoc :as mldoc-schema]
|
||||
[frontend.state :as state]
|
||||
[frontend.util :as util :refer [concatv mapcatv removev]]
|
||||
[goog.dom :as gdom]
|
||||
@@ -320,7 +321,7 @@
|
||||
(indent-with-2-spaces (dec current-level)))))])
|
||||
|
||||
;; {:malli/schema ...} only works on public vars, so use m/=> here
|
||||
(m/=> block-ast->simple-ast [:=> [:cat [:sequential :any]] [:sequential simple-ast-malli-schema]])
|
||||
(m/=> block-ast->simple-ast [:=> [:cat mldoc-schema/block-ast-schema] [:sequential simple-ast-malli-schema]])
|
||||
(defn- block-ast->simple-ast
|
||||
[block]
|
||||
(let [newline-after-block? (get-in *state* [:export-options :newline-after-block])]
|
||||
|
||||
Reference in New Issue
Block a user