using Markdig.Renderers;
using Markdig.Renderers.Html;
using OliverBooth.Services;
namespace OliverBooth.Markdown;
///
/// Represents a Markdown object renderer that handles elements.
///
internal sealed class TemplateRenderer : HtmlObjectRenderer
{
private readonly TemplateService _templateService;
///
/// Initializes a new instance of the class.
///
/// The .
public TemplateRenderer(TemplateService templateService)
{
_templateService = templateService;
}
///
protected override void Write(HtmlRenderer renderer, TemplateInline template)
{
renderer.Write(_templateService.RenderTemplate(template));
}
}