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