Table of Contents

Method CreateCodeBlock

Namespace: Sisk.Documenting.Html
Assembly: Sisk.Documenting.Html.dll

CreateCodeBlock(string, string?)

Creates an HTML code block element from the provided code and language.

protected virtual HtmlElement? CreateCodeBlock(string code, string? language)

Parameters

code string

The code to display in the code block.

language string?

The programming language of the code, or null for no language highlighting.

Returns

HtmlElement?

The HTML element representing the code block, or null if no code is provided.