src/Markdig/Markdown.cs
/// <summary>
/// Converts a Markdown string using a custom <see cref="IMarkdownRenderer"/>.
/// </summary>
/// <param name="markdown">A Markdown text.</param>
/// <param name="renderer">The renderer to convert Markdown to.</param>
/// <param name="pipeline">The pipeline used for the conversion.</param>
/// <param name="context">A parser context used for the parsing.</param>
/// <exception cref="ArgumentNullException">if markdown or writer variable are null</exception>
Converts a Markdown string using a custom .
Converts a Markdown string using a custom .
public static object Convert(string markdown, IMarkdownRenderer renderer, MarkdownPipeline? pipeline = null, MarkdownParserContext? context = null)
        {
            if (markdown is null) ThrowHelper.ArgumentNullException_markdown();
            if (renderer is null) ThrowHelper.ArgumentNullException(nameof(renderer));
            pipeline = GetPipeline(pipeline, markdown);
            var document = MarkdownParser.Parse(markdown, pipeline, context);
            pipeline.Setup(renderer);
            return renderer.Render(document);
        }
public static object Convert ( string markdown , IMarkdownRenderer renderer , MarkdownPipeline ? pipeline = null , MarkdownParserContext ? context = null ) { if ( markdown is null ) ThrowHelper . ArgumentNullException_markdown ( ) ; if ( renderer is null ) ThrowHelper . ArgumentNullException ( nameof ( renderer ) ) ; pipeline = GetPipeline ( pipeline , markdown ) ; var document = MarkdownParser . Parse ( markdown , pipeline , context ) ; pipeline . Setup ( renderer ) ; return renderer . Render ( document ) ; }
Converts a Markdown string using a custom .
Converts a Markdown string using a custom .
if markdown or writer variable are null
if markdown or writer variable are null
markdown
string
A Markdown text.
A Markdown text .
renderer
IMarkdownRenderer
The renderer to convert Markdown to.
The renderer to convert Markdown to .
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 .