Contribute

Edit this documentation

Translate the documentation or open the complete project on your computer.

Nothing is published until you choose to submit your work.

M-Press Flavoured Markdown specification

The strict Markdown profile used by M-Press, including metadata, components, diagnostics, and canonical formatting.

M-Press Flavoured Markdown, or MPF, is the strict Markdown profile used by M-Press. Source files keep the familiar .md extension. This document specifies schema 1.

MPF is Markdown with a closed set of conventions for metadata, components, and deterministic processing. It is not a competing document format and it does not permit MDX or executable source.

The key words must, must not, required, should, should not, and may describe normative requirements.

Goals

M-Press Flavoured Markdown is designed to:

  • parse in linear time without backtracking;
  • produce exact source ranges for every document node;
  • support streaming and incremental parsers;
  • remain readable without a renderer;
  • express M-Press components without MDX or executable source;
  • import every supported Markdown construct without losing content;
  • export every document as Markdown without generating MDX;
  • preserve the original bytes of unchanged imported Markdown;
  • make translation and browser editing operate on stable prose ranges; and
  • report malformed input at the line where it occurs.

MPF remains ordinary Markdown. Its stricter conventions give M-Press a deterministic document model for builds, transformations, translations, and editing.

Markdown compatibility contract

Markdown interoperability is part of the format, not a separate convenience tool. A conforming M-Press implementation must provide all of these guarantees:

  1. Every Markdown file accepted by the selected profile can be imported.
  2. Import never removes unknown content and never executes MDX.
  3. An unchanged Markdown file can be exported byte-for-byte in preserve mode.
  4. A changed document can be exported as complete, deterministic Markdown.
  5. Export never requires MDX, JSX, JavaScript, or a framework runtime.
  6. Unsupported extensions survive as exact opaque Markdown with a diagnostic.

The contract covers lexical preservation and document meaning. It does not claim that every third-party Markdown dialect assigns the same meaning to the same punctuation. The importer records the selected profile so that conversion is reproducible.

Conformance

A conforming parser must accept the grammar in this specification and must produce the specified node kinds. A conforming serializer must emit canonical M-Press Flavoured Markdown. A conforming Markdown adapter must implement the interchange requirements in Markdown interchange.

An implementation may impose documented limits on file size, line length, attribute count, and nesting depth. It must report a diagnostic when a limit is exceeded. It must not silently discard content.

Encoding and lines

An M-Press Flavoured Markdown document must use UTF-8. A byte order mark is permitted only at the start of a file and is not document content.

The parser must recognise LF, CRLF, and CR line endings. It must retain the original line-ending bytes in source ranges. A canonical serializer writes LF.

A blank line contains no characters other than spaces or tabs. Blank lines separate block constructs. More than one blank line has the same document meaning as one blank line, but the parser retains every byte as source trivia.

Minimal document

M-Press Flavoured Markdown has no required signature or preamble. This is a complete schema 1 document:

text
Hello world.

A document without metadata uses schema 1. The .md extension identifies the source as Markdown. The metadata schema field selects a different M-Press schema when one is required.

See the source and its rendering

The examples below are compiled by M-Press on this page. Select a tab to compare the rendered result with the exact Markdown that produced it.

Fast, readable documentation

M-Press turns plain Markdown into complete documentation.

Read the authoring guide and build the site.

Markdown
## Fast, readable documentation

M-Press turns _plain Markdown_ into complete documentation.

[Read the authoring guide](/authoring/) and build the site.

Last updated: