Skip to content

Syntax Support

This page describes editor integration, not the MDI grammar. Consult the official syntax reference and showcase for syntax definitions, limits, and escaping rules.

MDI featureEditor representationSerializationNesting
YAML front matterMetadata; not in bodyRestored by getMdi()
Ruby (group and split)Atomic inline nodeCanonical MDISupported inside supported marks
Tate-chu-yokoEditable markCanonical MDISupported
BotenEditable markCanonical MDISupported
No-breakEditable markCanonical MDISupported
WarichuEditable markCanonical MDISupported
KernEditable markCanonical MDISupported
Explicit breakInline leaf nodeCanonical MDIInline context
Blank ([[blank]] or \)mdiBlank atomic block\Block
Pagebreak (plain, right, left)mdiPagebreak atomic block with variantCanonical pagebreak macroBlock
IndentParagraph attr mdiIndent: number[[indent:N]]Paragraph metadata
BottomParagraph attr mdiBottom: number[[bottom]] or [[bottom:N]]Paragraph metadata

Blank and pagebreak nodes map to semantic DOM hooks and remain selectable atomic blocks. Pagebreak variant is null, "right", or "left". Indent and bottom stay attached to their paragraph when its text is edited. A bare [[bottom]] is represented by mdiBottom: 0.

Pagebreak variants serialize as [[pagebreak]], [[pagebreak:right]], and [[pagebreak:left]], respectively.

The upstream MDI parser decides grammar validity, numeric limits, and canonical spelling. Invalid syntax remains literal text. Other unknown mdast extension nodes continue to fall back to editable literal Markdown so that one unknown construct does not prevent the document from loading.

Released under the MIT License.