pub struct ParseOptions {
pub track_positions: bool,
pub parse_math: bool,
pub parse_diagrams: bool,
}Expand description
Runtime configuration for the Markdown parser.
Pass to parse_with_options to skip expensive hot-path work in
performance-sensitive pipelines.
All fields default to true (full-featured parse). Set individual fields
to false to opt out of that work at runtime (not just at compile time).
Fields§
§track_positions: boolTrack source positions (line/column spans) on every AST node.
When false, the O(n) string scans inside span conversion are skipped
and all node span fields will be None. Use this for render-only
pipelines that never inspect positions.
Default: true.
parse_math: boolParse inline $...$ / $$...$$ math and fenced ```math blocks.
When false, math syntax falls through to plain text or regular code
blocks. Skips the math parser attempts in the inline hot loop.
Default: true.
parse_diagrams: boolParse fenced ```mermaid code blocks into NodeKind::MermaidDiagram.
When false, mermaid blocks are emitted as regular NodeKind::CodeBlock
nodes. Skips the diagram branch in the fenced-code-block parser.
Default: true.
Trait Implementations§
Source§impl Clone for ParseOptions
impl Clone for ParseOptions
Source§fn clone(&self) -> ParseOptions
fn clone(&self) -> ParseOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ParseOptions
impl Debug for ParseOptions
Auto Trait Implementations§
impl Freeze for ParseOptions
impl RefUnwindSafe for ParseOptions
impl Send for ParseOptions
impl Sync for ParseOptions
impl Unpin for ParseOptions
impl UnsafeUnpin for ParseOptions
impl UnwindSafe for ParseOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more