pub struct ParseOptions {
pub hard_breaks: bool,
pub enable_highlight: bool,
pub enable_strikethrough: bool,
pub enable_underline: bool,
pub enable_tables: bool,
pub enable_autolink: bool,
pub enable_task_lists: bool,
pub disable_raw_html: bool,
pub max_nesting_depth: usize,
pub max_input_size: usize,
}Expand description
Options for customizing Markdown parsing behavior.
Fields§
§hard_breaks: boolWhen true, every newline inside a paragraph becomes a hard line break (<br />),
similar to GitHub Flavored Markdown. Default: true.
enable_highlight: boolEnable ==highlight== syntax → <mark>. Default: true.
enable_strikethrough: boolEnable ~~strikethrough~~ syntax → <del>. Default: true.
enable_underline: boolEnable ++underline++ syntax → <u>. Default: true.
enable_tables: boolEnable pipe table syntax. Default: true.
enable_autolink: boolAutomatically detect bare URLs (https://...) and emails (user@example.com)
and wrap them in <a> tags. Default: true.
enable_task_lists: boolEnable GitHub-style task lists (- [ ] unchecked, - [x] checked)
in list items. Default: true.
disable_raw_html: boolWhen true, raw HTML blocks and inline HTML are escaped instead of passed
through verbatim. This prevents XSS when rendering untrusted markdown.
Default: false.
max_nesting_depth: usizeMaximum nesting depth for block-level containers (blockquotes, list items).
Once exceeded, further nesting is treated as paragraph text.
Default: 128.
max_input_size: usizeMaximum input size in bytes. Inputs exceeding this limit are truncated.
0 means no limit. Default: 0.