Skip to main content

parse_reference

Function parse_reference 

Source
pub fn parse_reference(s: &str, refmap: &mut RefMap) -> usize
Expand description

Consume link reference definitions from the front of a paragraph’s raw content, adding them to refmap. Returns the number of BYTES consumed, or 0 if s does not start with a definition.

Reference definitions are parsed during the block phase, before any inline parser for the document exists, so a scratch parser is built per call; nothing here depends on the parse options.