pub struct RenderOptions {
pub hyperlinks: bool,
pub code_theme: Option<String>,
pub default_language: Option<String>,
pub fences: Vec<Arc<dyn FenceRenderer>>,
pub justify: Option<Justify>,
}Expand description
What a document’s code, links and hyperlinks look like when drawn.
The defaults match core’s Markdown: hyperlinks on (a link’s text is an
OSC 8 link), code in Syntax’s default theme (or the console’s code
highlighting), and no fence renderers.
Fields§
§hyperlinks: booltrue: a link’s text carries an OSC 8 hyperlink. false: the target
is written out after the text, text (https://…), as rich -m does
without -y.
code_theme: Option<String>The Syntax theme for code blocks; None keeps the console’s.
default_language: Option<String>The language of code blocks that name none (a man page’s examples,
an AsciiDoc listing). None draws them as plain text.
fences: Vec<Arc<dyn FenceRenderer>>Renderers asked first for code blocks with a language (Mermaid, DOT),
as Markdown::fence_renderer asks them for fences.
justify: Option<Justify>The justification of paragraphs; None is left.
Implementations§
Source§impl RenderOptions
impl RenderOptions
Sourcepub fn hyperlinks(self, hyperlinks: bool) -> Self
pub fn hyperlinks(self, hyperlinks: bool) -> Self
Whether links carry OSC 8 hyperlinks (see hyperlinks).
Sourcepub fn code_theme(self, theme: impl Into<String>) -> Self
pub fn code_theme(self, theme: impl Into<String>) -> Self
The Syntax theme for code blocks.
Sourcepub fn default_language(self, language: impl Into<String>) -> Self
pub fn default_language(self, language: impl Into<String>) -> Self
The language of code blocks that name none.
Sourcepub fn fence_renderer(self, renderer: Arc<dyn FenceRenderer>) -> Self
pub fn fence_renderer(self, renderer: Arc<dyn FenceRenderer>) -> Self
Ask renderer first for code blocks with a language.