FenceRendererExtension Class

Definition

Renders the fenced code blocks of one language (```chart) as the control a FenceRendererFactory returns, without writing a Markdig renderer.

public sealed class FenceRendererExtension : IMarkViewExtension

Remarks

The language is matched case-insensitively against the first word of the info string. A fence renderer takes precedence over every other renderer of fenced code blocks (Mermaid diagrams, syntax highlighting, the plain code block) whatever order the extensions were registered in. When several fence renderers share a language, the last one registered wins, so a viewer's own Extensions override Extensions.

The control is written inside a Border with the markdown-custom-fence and markdown-fence-<language> classes (the language in lower case), which selection copies as the fenced source unless the control has its own CopyTextProperty. When the factory returns null or throws, the block renders as it would without this extension.

Tip: use kind:method, kind:property, kind:ctor. Press Esc to clear.

Constructors (1)

Properties (2)

Methods (1)