Skip to main content

parse_inline_text

Function parse_inline_text 

Source
pub fn parse_inline_text(
    builder: &mut GreenNodeBuilder<'_>,
    text: &str,
    config: &ParserOptions,
    suppress_inner_links: bool,
)
Expand description

Parse inline elements from text content nested inside a link/image/span.

Used for recursive inline parsing of link text, image alt, span content, etc. Suppresses constructs that would create nested links (CommonMark §6.3 forbids links inside links), notably extended bare-URI autolinks under GFM.

suppress_inner_links should be true when the recursion is for a LINK or REFERENCE-LINK’s text, where inner link / reference-link brackets must emit as literal text (pandoc-native: [link [inner](u2)](u1) → outer Link with Str "[inner](u2)"). Image alt text and all non-link contexts pass false: pandoc-native verifies ![alt with [inner](u)](u2) keeps the inner Link, and bracketed spans / native spans / inline footnotes / emphasis all allow nested links.