This commit is contained in:
shump
2026-01-15 11:11:42 -06:00
commit 7562a4ce14
67 changed files with 5636 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
using Avalonia.Controls;
using Markdig.Syntax;
namespace MarkdownEditor.Views.Renderers;
/// <summary>
/// Interface for rendering markdown blocks into Avalonia controls.
/// Allows for modular rendering of different markdown block types.
/// </summary>
public interface IMarkdownBlockRenderer
{
/// <summary>
/// Determines if this renderer can handle the given block type.
/// </summary>
/// <param name="block">The markdown block to check.</param>
/// <returns>True if this renderer can handle the block, false otherwise.</returns>
bool CanRender(Block block);
/// <summary>
/// Renders the markdown block into an Avalonia control.
/// </summary>
/// <param name="block">The markdown block to render.</param>
/// <returns>The rendered Avalonia control, or null if rendering fails.</returns>
Control? Render(Block block);
}