Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 1.17 KB

README.md

File metadata and controls

35 lines (22 loc) · 1.17 KB

Markdown Generator API

The API of Markdown Generator is centered around the MdDocument class that represents a document. An instance of MdDocument is a collection of blocks that make up the document.

Blocks

There are different types of blocks to represent different Markdown features. At the core, there are two groups of blocks

  • Container blocks: Blocks that are a collection of other blocks
  • Leaf blocks: Blocks that contain content in the form of spans that can not contain other blocks

A full list of block types can be found here.

Spans

Content of leaf blocks is represented as spans. Spans are inline text elements that either wrap string content or other spans.

A full list of span types can be found here.

Serialization options

For several markdown constructs, CommonMark defines multiple possible syntaxes. (e.g. text can be emphasized using both * and _).

MdSerializationOptions can be used to customize how these constructs are serialized.

See also