using Markdig;
using Markdig.Renderers;
using MfGames.Markdown.Gemtext.Renderers;
namespace MfGames.Markdown.Gemtext.Extensions
{
///
/// Extension method to retain HTML blocks as a code fenced block with
/// "html" as the data.
///
///
public class HtmlAsCodeBlocks : IMarkdownExtension
{
///
public void Setup(MarkdownPipelineBuilder pipeline)
{
}
///
public void Setup(MarkdownPipeline pipeline, IMarkdownRenderer renderer)
{
if (renderer is GemtextRenderer gemtext)
{
gemtext.HtmlBlockFormatting = HtmlBlockFormatting.CodeBlock;
}
}
}
}