pub struct Highlight {
pub themes: Option<Map<String, Value>>,
pub theme: Option<String>,
pub default_language: Option<String>,
pub fallback_language: Option<String>,
pub color_replacements: BTreeMap<String, ColorReplacement>,
pub add_language_class: bool,
pub inline: Option<InlineCode>,
pub meta_property: Option<String>,
pub transformers: Vec<HighlightTransformer>,
}Expand description
html.highlight: code blocks colored as Shiki colors them, natively by giallo;
options named as @shikijs/rehype names them.
Fields§
§themes: Option<Map<String, Value>>The theme of each color mode, light first, as {"light": …, "dark": …}.
theme: Option<String>The one theme, when themes is not given.
default_language: Option<String>The language of a block that names none; such a block is left alone without it.
fallback_language: Option<String>The language of a block naming one Shiki does not know; left alone without it.
color_replacements: BTreeMap<String, ColorReplacement>Colors to replace, by their lowercase spelling: a color for every theme, or a theme’s name to a map of its own.
add_language_class: boolAdd language-<name> to each highlighted <code>.
inline: Option<InlineCode>Highlight inline code too, by how it names its language: tailing-curly-colon
reads `a(){:js}`.
meta_property: Option<String>The <pre> property that gets a block’s meta, the text after its language; the JSON
stand-in for parseMetaString: meta => ({ [name]: meta }).
transformers: Vec<HighlightTransformer>The transformers of @shikijs/transformers to run, in order, by name or with options.