pub struct LinkScanContext {
pub skip_raw_html: bool,
pub skip_autolinks: bool,
pub disallow_inner_links: bool,
}Expand description
Flags that control which inline spans the link-bracket scanner treats as
opaque (so a ] inside them does not terminate the link/image text).
skip_raw_htmlis universal across dialects: pandoc-markdown and CommonMark both refuse to close link text inside a raw HTML span (e.g.[foo <bar attr="](baz)">), per CommonMark spec example #524 / #536.skip_autolinksis CommonMark-only. Pandoc-markdown does not treat<scheme://...>as opaque inside link text, so the same input produces a different parse under each dialect (CommonMark spec example #526 / #538). Always derive this fromextensions.autolinks && dialect == Dialect::CommonMark.disallow_inner_linksis CommonMark-only structural rule (§6.4): “Links may not contain other links, at any level of nesting.” When the candidate link/image text contains a valid inline link or image, the outer match is rejected so the inner-most definition is used instead (spec examples #518–#520, #532). Pandoc-markdown allows nested links, so the flag isfalsethere.
Fields§
§skip_raw_html: bool§skip_autolinks: bool§disallow_inner_links: boolImplementations§
Source§impl LinkScanContext
impl LinkScanContext
pub fn from_options(config: &ParserOptions) -> Self
Trait Implementations§
Source§impl Clone for LinkScanContext
impl Clone for LinkScanContext
Source§fn clone(&self) -> LinkScanContext
fn clone(&self) -> LinkScanContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for LinkScanContext
impl Default for LinkScanContext
Source§fn default() -> LinkScanContext
fn default() -> LinkScanContext
Returns the “default value” for a type. Read more
impl Copy for LinkScanContext
Auto Trait Implementations§
impl Freeze for LinkScanContext
impl RefUnwindSafe for LinkScanContext
impl Send for LinkScanContext
impl Sync for LinkScanContext
impl Unpin for LinkScanContext
impl UnsafeUnpin for LinkScanContext
impl UnwindSafe for LinkScanContext
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
Mutably borrows from an owned value. Read more