pub fn render_styled_html(
text: &str,
highlight_spans: &[HighlightSpan],
theme: &Theme,
) -> StringExpand description
Render styled text with syntax highlighting to HTML with inline CSS
The generated HTML uses a <pre> block with inline styles for each
syntax-highlighted span. This allows pasting into rich text editors
like Google Docs, Word, etc.
§Arguments
text- The text to renderhighlight_spans- Syntax highlighting spans with byte ranges and colorstheme- The theme to use for background and default foreground colors
§Returns
HTML string with inline styles