Class HtmlRenderer
- Namespace
- BlazOrbit.SyntaxHighlight.Rendering
- Assembly
- BlazOrbit.SyntaxHighlight.dll
Renders a list of tokens as HTML with syntax highlighting spans.
public sealed class HtmlRenderer
- Inheritance
-
objectHtmlRenderer
Constructors
HtmlRenderer()
public HtmlRenderer()
Methods
Render(IReadOnlyList<Token>, HtmlRenderOptions?)
Renders the specified tokens as highlighted HTML.
public string Render(IReadOnlyList<Token> tokens, HtmlRenderOptions? options = null)
Parameters
tokensIReadOnlyList<Token>The tokens to render.
optionsHtmlRenderOptionsThe render options, or null to use defaults.
Returns
- string
The highlighted HTML string.