This site provides a machine-readable index at /llms.txt.

Skip to main content Skip to navigation

ICodeBlockPreprocessor Pennington.Markdown.Extensions

Preprocesses fenced code blocks before normal highlighting. Implementations can intercept blocks with specific language modifiers (e.g., "csharp:xmldocid") and provide pre-highlighted HTML.

Properties

Priority int
Priority — higher runs first.

Methods

TryProcess

#
CodeBlockPreprocessResult? TryProcess(string code, string languageId);

Attempts to preprocess a code block. Returns a result if handled, or null to pass through.

Parameters

code string
languageId string

Returns

CodeBlockPreprocessResult?

Pennington.Markdown.Extensions.ICodeBlockPreprocessor

namespace Pennington.Markdown.Extensions;

/// Preprocesses fenced code blocks before normal highlighting. Implementations can intercept blocks with specific language modifiers (e.g., "csharp:xmldocid") and provide pre-highlighted HTML.
public interface ICodeBlockPreprocessor
{
    /// Priority — higher runs first.
    
int Priority { get; }
/// Attempts to preprocess a code block. Returns a result if handled, or null to pass through.
CodeBlockPreprocessResult? TryProcess(string code, string languageId);
}