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

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 System.Collections.Generic.IReadOnlySet<string>
Default: new HashSet<string> { "bash", "shell", "sh" }
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 => 75;
/// Languages this highlighter handles (e.g., "csharp", "python").
public IReadOnlySet<string> SupportedLanguages { get; } = new HashSet<string> { "bash", "shell", "sh" };
}