Expand description
Syntax highlighting for fenced code blocks.
This module provides syntect-based syntax highlighting, theme management,
and terminal background detection. It is gated behind the syntax-highlight
feature (enabled by default).
§Built-in themes
Seven themes are bundled with the crate:
base16-eighties.dark(default for dark mode)base16-ocean.darkbase16-mocha.darkbase16-ocean.lightInspiredGitHubSolarized (dark)Solarized (light)(default for light mode)
Enums§
- Theme
Mode - Controls which syntax highlighting theme is applied to code blocks.
Functions§
- highlight_
lines - Highlight source code lines using syntect.
- list_
themes - Lists the names of all available syntax highlighting themes.
- syntax_
set - Returns the global syntax set (lazy-initialized).
- themes
- Returns the global theme set (lazy-initialized).