Highlight
Server-side syntax highlighting for markdown code blocks.
Discount compiles fenced code blocks to the very regular
...escaped source...
shape, so highlighting happens as a string splice on the compiled HTML (before any Lexbor pass): the code content is unescaped, run through tartrazine, and the block is replaced by the formatted markup. Highlighted code uses CSS classes prefixed "tz-" (no inline styles), so the generated css/syntax.css can swap palettes for the dark/light scheme toggle with no client-side JavaScript.
The syntax themes are derived from the site's base16 color_scheme (dark + light variants) unless conf.yml sets syntax_theme to an explicit tartrazine theme name.
Constants
Regex for Discount's fenced-code output. The content is HTML-escaped, so "" can never occur inside it
Class methods
The stylesheet for highlighted code: the dark theme scoped to [data-theme=dark], the light theme to everything else (or plain when a single explicit syntax_theme is configured). The Background rule's background-color is dropped so themes keep their own code-block backgrounds and only token colors apply.
The singleton HTML formatter: class-based output (no inline styles) so syntax.css controls the palette per color scheme
Highlight every fenced code block in html. Blocks whose language has no lexer are returned untouched (logged at debug).
The dark and light syntax themes for this site: derived from the base16 color_scheme, from explicit dark_scheme/light_scheme overrides, or from the explicit syntax_theme override