Introduction
editMeziantou.Framework.Markdown parses Markdown and converts it to HTML in .NET. It follows CommonMark 0.31.2 and GitHub Flavored Markdown, and its extensions add other syntaxes, such as alerts, footnotes, definition lists and grid tables.
The syntax tree keeps every character of the text it was parsed from, whitespace and markers included: a document is written back exactly, and an edit only changes the text of what it replaces. The tree is built on Meziantou.Framework.Language, as the CSS, JSON or XML trees are.
What you can do with it
- Convert Markdown to HTML or to plain text with one call. See Getting started.
- Inspect and edit a document: find the headings or the links, replace a node, insert blocks, and write the text back without changing the rest of it. See The syntax tree.
- Control the HTML: make the URLs absolute, rewrite them, add
relto the links, or map the lines of the source to the elements. See Rendering. - Enable extensions: tables, task lists, alerts, footnotes, heading identifiers, emojis, mathematics, diagrams, YAML front matter and more. See Extensions.
- Format a document in a consistent style, without changing its HTML. See Formatting.
- Render the Markdown of your users safely. See Security.
Version 2.0 replaces the parser of version 1.x, a fork of Markdig. See Migrating from 1.x.