MarkdownUtilities.SplitMarkdownByCodeBlocks

Splits Markdown and Codeblocks into a collection that allows you to exclude code blocks from processing certain operation.

Particularily useful for operations in RenderExtensions which might have to perform pre or post processing that needs to ignore code blocks

Example: See DocFxRenderExtension.cs

Once you've processed the list of you have to recombine the list into a string either by writing out to string builder or concat, or by updating each item in this list and then genericly joinging the list.

public List<MarkdownCodeSplitItem> SplitMarkdownByCodeBlocks(string markdown)

Parameters

markdown
Markdown string to split