CodeBlockPreprocessResult
Pennington.Markdown.Extensions
Result from a code block preprocessor.
Properties
BaseLanguagestring- The base language for CSS class purposes.
HighlightedHtmlstring- Fully highlighted HTML (wrapped in pre/code tags).
SkipChromebool- If true, emit
HighlightedHtmlas-is with none of the standard code-block chrome (outercode-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. SkipTransformbool- 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
HighlightedHtmlstring- Fully highlighted HTML (wrapped in pre/code tags).
BaseLanguagestring- The base language for CSS class purposes.
SkipTransformbool- If true, skip CodeTransformer on the output.
SkipChromebool- If true, emit
HighlightedHtmlas-is with none of the standard code-block chrome (outercode-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; }
}