Skip to main content

Module highlight

Module highlight 

Source
Expand description

Syntax highlighting adapter for comrak’s plugin system. Syntax highlighting adapter for comrak.

Implements comrak’s SyntaxHighlighterAdapter trait using syntect’s class-based generator. Output uses CSS class names (<span class="…">) rather than inline style="…" attributes, which means callers must ship a stylesheet — see theme_css for generating one from any built-in theme.

Structs§

SyntectAdapter
A syntect-backed adapter for comrak’s rendering plugin system.

Constants§

DEFAULT_THEME
Default theme used when none is specified.

Functions§

apply_syntax_highlighting
Highlights a code string with class-based spans (standalone API).
theme_css
Generates a CSS stylesheet for the named built-in theme.