MarkdownHtmlRenderer Class

Renders a Markdown syntax tree as HTML, as the CommonMark reference implementation does.

public static class MarkdownHtmlRenderer

Methods

NameDescription
ToHtml(MarkdownSyntaxTree)Renders the document as HTML.
ToHtml(MarkdownSyntaxTree, MarkdownHtmlRendererOptions?)Renders the document as HTML.

ToHtml overloads

ToHtml(MarkdownSyntaxTree)

MarkdownHtmlRenderer.cs

Renders the document as HTML.

public static string ToHtml(MarkdownSyntaxTree tree)
Parameters
tree MarkdownSyntaxTree
Returns

string

Exceptions
ArgumentNullException
tree is null.

ToHtml(MarkdownSyntaxTree, MarkdownHtmlRendererOptions?)

MarkdownHtmlRenderer.cs

Renders the document as HTML.

public static string ToHtml(MarkdownSyntaxTree tree, MarkdownHtmlRendererOptions? options)
Parameters
tree MarkdownSyntaxTree
The document.
options MarkdownHtmlRendererOptions?
How to write the HTML, or null for MarkdownHtmlRendererOptions.Default.
Returns

string

Exceptions
ArgumentNullException
tree is null.