Function parse_heading

Source
fn parse_heading(line: &[Token]) -> MdBlockElement
Expand description

Parses a vector of tokens representing a heading into an MdBlockElement::Header.

Determines the heading level and parses the heading content.

§Arguments

  • line - A vector of tokens representing a heading line.

§Returns

An MdBlockElement representing the heading, or a paragraph if the heading is invalid.