This documentation is also published as Markdown for efficient machine reading: the whole site is indexed at /llms.txt, and every page has a clean Markdown copy at the same URL with .md appended. These are generated from the same source and cost far fewer tokens to read than this rendered HTML.

Skip to main content Skip to navigation

CodeBlockPreprocessResult Pennington.Markdown.Extensions

Result from a code block preprocessor.

Properties

BaseLanguage string
The base language for CSS class purposes.
HighlightedHtml string
Fully highlighted HTML (wrapped in pre/code tags).
SkipChrome bool
If true, emit HighlightedHtml as-is with none of the standard code-block chrome (outer code-highlight-wrapper, language head bar, container divs) — the preprocessor owns the entire output. Use for fences that render to something other than a code block, such as a diagram.
SkipTransform bool
If true, skip CodeTransformer on the output.

Constructors

CodeBlockPreprocessResult

#
public CodeBlockPreprocessResult(string HighlightedHtml, string BaseLanguage, bool SkipTransform = false, bool SkipChrome = false)

Result from a code block preprocessor.

Parameters

HighlightedHtml string
Fully highlighted HTML (wrapped in pre/code tags).
BaseLanguage string
The base language for CSS class purposes.
SkipTransform bool
If true, skip CodeTransformer on the output.
SkipChrome bool
If true, emit HighlightedHtml as-is with none of the standard code-block chrome (outer code-highlight-wrapper, language head bar, container divs) — the preprocessor owns the entire output. Use for fences that render to something other than a code block, such as a diagram.

Pennington.Markdown.Extensions.CodeBlockPreprocessResult

namespace Pennington.Markdown.Extensions;

/// Result from a code block preprocessor.
public record CodeBlockPreprocessResult
{
    /// The base language for CSS class purposes.
    
public string BaseLanguage { get; set; }
/// Result from a code block preprocessor.
public CodeBlockPreprocessResult(string HighlightedHtml, string BaseLanguage, bool SkipTransform = false, bool SkipChrome = false)
; /// Fully highlighted HTML (wrapped in pre/code tags).
public string HighlightedHtml { get; set; }
/// If true, emit HighlightedHtml as-is with none of the standard code-block chrome (outer code-highlight-wrapper, language head bar, container divs) — the preprocessor owns the entire output. Use for fences that render to something other than a code block, such as a diagram.
public bool SkipChrome { get; set; }
/// If true, skip CodeTransformer on the output.
public bool SkipTransform { get; set; }
}