Function parse_link_type

Source
fn parse_link_type<F>(
    cursor: &mut TokenCursor,
    make_element: F,
) -> MdInlineElement
Expand description

Parses a link type (either a link or an image) from the current position of the cursor.

§Arguments

  • cursor - A mutable reference to a TokenCursor that tracks the current position in the token stream.
  • make_element - A closure that takes the parsed label elements, optional title, and URI, and returns an MdInlineElement representing the link or image.

§Returns

An MdInlineElement representing the parsed link or image.