The code to highlight.
The name of the code's language.
The language must have been loaded previously by calling loadLanguage.
The name of the theme to use.
All themes from the default collection
are supported. The theme name is equivalent to its Rust path specifier, so for example the gruvbox dark theme
is named gruvbox::dark
. Alternatively, a custom theme can be specified.
The renderer to use.
The renderer name is either HTML
or Terminal
in any casing. To specify a background color
for the terminal renderer, append a hex color literal like terminal#282828
or Terminal#fff
.
By default, the HTML
renderer will be used.
The highlighted code as HTML code.
See here for more information on the output.
Generated using TypeDoc
Highlight code and render to the requested format.
If you plan to highlight the same input multiple times, use process and render instead.