pub fn start_highlighted_html_snippet(t: &Theme) -> (String, Color)
Expand description
Returns a <pre style="...">\n
tag with the correct background color for the given theme.
This is for if you want to roll your own HTML output, you probably just want to use
highlighted_html_for_string
.
If you don’t care about the background color you can just prefix the lines from
styled_line_to_highlighted_html
with a <pre>
. This is meant to be used with
IncludeBackground::IfDifferent
.
As of v3.0
this method also returns the background color to be passed to IfDifferent
.
You’re responsible for creating the string </pre>
to close this, I’m not gonna provide a
helper for that :-)