MermaidBlockRendererHandles all Markdig.Syntax.FencedCodeBlock nodes. Mermaid blocks are rendered to SVG via Mermaider.MermaidRenderer (pure .NET, no browser required); non-mermaid fenced blocks are rendered as styled code blocks and respect any CodeHighlighter registered by the SyntaxHighlighting extension. While IsProvisional(MarkdownObject) holds for a block (it contains the end of the text being streamed), a Mermaid fence is rendered as a mermaid code block and no diagram render is scheduled; it renders as a diagram once a blank line or another block follows it. A diagram renders as soon as it comes within a screen of the viewport. Where threads are available (not in the browser), every diagram also starts rendering in the background once it is in a window, so that scrolling to it later costs nothing. With IsImageZoomEnabled, clicking a rendered diagram opens it in the viewer's lightbox, as an image, where it is fitted to the view and can be zoomed and panned.
MermaidExtensionRegisters MermaidBlockRenderer so it intercepts ```mermaid fences before CodeBlockRenderer. Scans for the first renderer that would accept a Markdig.Syntax.FencedCodeBlock and inserts just before it, rather than a fixed Insert(0, ...) — that way a narrower, more specific fenced-block renderer (e.g. MarkView.Avalonia.Math's MathBlockRenderer, which only accepts its own MathBlock subtype) registered before or after this one is never displaced from the front of the list, regardless of registration order.
Enums (1)
MermaidStyleThe visual style Mermaid diagrams are painted in. Every style draws the same layout in the colours of the MarkdownMermaid* theme resources; only the paint changes.