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 under /_llms/. 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

ShellHighlighter Pennington.Highlighting

Provides syntax highlighting for shell/bash/batch commands. Implements ICodeHighlighter with priority 75 (higher than TextMate for shell languages).

Properties

Priority int
Priority — higher wins when multiple highlighters support a language.
SupportedLanguages IReadOnlySet<string>
Languages this highlighter handles (e.g., "csharp", "python").

Methods

Highlight

#
public string Highlight(string code, string language)

Highlight code. Returns HTML with spans.

Parameters

code string
language string

Returns

string

Pennington.Highlighting.ShellHighlighter

namespace Pennington.Highlighting;

/// Provides syntax highlighting for shell/bash/batch commands. Implements ICodeHighlighter with priority 75 (higher than TextMate for shell languages).
public class ShellHighlighter
{
    /// Highlight code. Returns HTML with spans.
    
public string Highlight(string code, string language)
; /// Priority — higher wins when multiple highlighters support a language.
public int Priority { get; }
/// Languages this highlighter handles (e.g., "csharp", "python").
public IReadOnlySet<string> SupportedLanguages { get; }
}