Skip to main content

ParseOptions

Struct ParseOptions 

Source
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: bool

When true, every newline inside a paragraph becomes a hard line break (<br />), similar to GitHub Flavored Markdown. Default: true.

§enable_highlight: bool

Enable ==highlight== syntax → <mark>. Default: true.

§enable_strikethrough: bool

Enable ~~strikethrough~~ syntax → <del>. Default: true.

§enable_underline: bool

Enable ++underline++ syntax → <u>. Default: true.

§enable_tables: bool

Enable pipe table syntax. Default: true.

§enable_autolink: bool

Automatically detect bare URLs (https://...) and emails (user@example.com) and wrap them in <a> tags. Default: true.

§enable_task_lists: bool

Enable GitHub-style task lists (- [ ] unchecked, - [x] checked) in list items. Default: true.

§disable_raw_html: bool

When 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: usize

Maximum nesting depth for block-level containers (blockquotes, list items). Once exceeded, further nesting is treated as paragraph text. Default: 128.

§max_input_size: usize

Maximum input size in bytes. Inputs exceeding this limit are truncated. 0 means no limit. Default: 0.

Trait Implementations§

Source§

impl Default for ParseOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.