Code Block Renderer Class
A MAML renderer for CodeBlock.
Definition
Namespace: Sandcastle.Core.Markdown.Renderers
Assembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2026.3.29.0
Assembly: Sandcastle.Core (in Sandcastle.Core.dll) Version: 2026.3.29.0
C#
public class CodeBlockRenderer : HtmlObjectRenderer<CodeBlock>VB
Public Class CodeBlockRenderer
Inherits HtmlObjectRenderer(Of CodeBlock)C++
public ref class CodeBlockRenderer : public HtmlObjectRenderer<CodeBlock^>F#
type CodeBlockRenderer =
class
inherit HtmlObjectRenderer<CodeBlock>
end- 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) |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
| GetHashCode | Serves as the default hash function. (Inherited from Object) |
| GetType | Gets the Type of the current instance. (Inherited from Object) |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
| ToString | Returns 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) |