src/Markdig/Markdown.cs
/// <summary>
/// Converts a Markdown string to HTML.
/// </summary>
/// <param name="markdown">A Markdown text.</param>
/// <param name="pipeline">The pipeline used for the conversion.</param>
/// <param name="context">A parser context used for the parsing.</param>
/// <returns>The result of the conversion</returns>
/// <exception cref="ArgumentNullException">if markdown variable is null</exception>
Converts a Markdown string to HTML.
Converts a Markdown string to HTML .
public static string ToHtml(string markdown, MarkdownPipeline? pipeline = null, MarkdownParserContext? context = null)
        {
            if (markdown is null) ThrowHelper.ArgumentNullException_markdown();
            pipeline = GetPipeline(pipeline, markdown);
            var document = MarkdownParser.Parse(markdown, pipeline, context);
            return ToHtml(document, pipeline);
        }
public static string ToHtml ( string markdown , MarkdownPipeline ? pipeline = null , MarkdownParserContext ? context = null ) { if ( markdown is null ) ThrowHelper . ArgumentNullException_markdown ( ) ; pipeline = GetPipeline ( pipeline , markdown ) ; var document = MarkdownParser . Parse ( markdown , pipeline , context ) ; return ToHtml ( document , pipeline ) ; }
Converts a Markdown string to HTML.
Converts a Markdown string to HTML .
The result of the conversion
The result of the conversion
if markdown variable is null
if markdown variable is null
markdown
string
A Markdown text.
A Markdown text .
pipeline
MarkdownPipeline?
The pipeline used for the conversion.
The pipeline used for the conversion .
context
MarkdownParserContext?
A parser context used for the parsing.
A parser context used for the parsing .