CodeBlockRenderer Class

A MAML renderer for CodeBlock.

Definition

Namespace: Sandcastle.Core.Markdown.Renderers
Assembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2026.3.29.0
public class CodeBlockRenderer : HtmlObjectRenderer<CodeBlock>
Inheritance
Object    MarkdownObjectRendererHtmlRenderer, CodeBlock    HtmlObjectRendererCodeBlock    CodeBlockRenderer

Remarks

The MAML code element is not nested within a pre element and the language name is never prefixed.

Constructors

CodeBlockRenderer Initializes a new instance of the CodeBlockRenderer class.

Properties

BlockMapping Gets a map of custom block mapping to render as custom blocks instead of code blocks. For example defining {"mermaid", "pre"} will render a block with info `mermaid` as a `pre` block but without the code HTML element.
BlocksAsDiv Gets a map of fenced code block info that should be rendered as div blocks instead of code blocks.
TryWriters Gets the optional writers attached to this instance.
(Inherited from MarkdownObjectRendererHtmlRenderer, CodeBlock)

Methods

Accept
(Inherited from MarkdownObjectRendererHtmlRenderer, CodeBlock)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
ToStringReturns a string that represents the current object.
(Inherited from Object)
Write(HtmlRenderer, CodeBlock) Writes the specified Markdown object to the renderer.
(Overrides MarkdownObjectRenderer.Write(UTP, UTP))
Write(RendererBase, MarkdownObject)
(Inherited from MarkdownObjectRendererHtmlRenderer, CodeBlock)

See Also