pub struct MarkdownExtensions {
pub directives: bool,
pub math: bool,
pub html_elements: bool,
pub highlight: bool,
pub highlight_colors: bool,
}Expand description
Opt-in Markdown extensions to enable for a parse — for either the read path
(Document::parse_with) or the edit path (Editor::new_ext). Ignored
for non-Markdown formats. Every field defaults off, matching the library; the
default-on extensions (tables, strikethrough, task lists, …) are always on
and need no flag here.
Fields§
§directives: boolGeneric directives: :name, ::name, :::name.
math: bool$...$ / $$...$$ math.
html_elements: boolParse recognized raw HTML into semantic AST nodes — an <img> becomes an
image node instead of an opaque raw_block/raw_inline, so
it is addressable by Document::query and the tree read paths. Only
tags that map verbatim onto the source are promoted; the rest stay raw.
highlight: bool==text== highlight, parsed as a mark node (the markdown-it-mark /
Obsidian extension). Only a run of exactly two = delimits.
highlight_colors: boolColoured highlights on top of highlight (Obsidian 1.14): a circle
emoji right after the opening == — ==🔴 text== — is stripped from
the content and recorded as the mark’s data-color attribute
(red, orange, yellow, green, blue, purple, brown). Inert
unless highlight is also set.
Trait Implementations§
Source§impl Clone for MarkdownExtensions
impl Clone for MarkdownExtensions
Source§fn clone(&self) -> MarkdownExtensions
fn clone(&self) -> MarkdownExtensions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more