Method Highlight
Highlight(string, string?)
Highlights a single line of code and returns styled segments.
IReadOnlyList<StyledSegment> Highlight(string code, string? language)
Parameters
codestringThe source code line to highlight.
languagestringThe language identifier from the fence (e.g.
csharp), or null if not specified.
Returns
- IReadOnlyList<StyledSegment>
A list of StyledSegment instances representing the highlighted tokens.