Function parse_codeblock

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

Parses a vector of tokens representing a code block into an MdBlockElement::CodeBlock.

Extracts the language (if specified) and the code content.

§Arguments

  • line - A vector of tokens representing a code block.

§Returns

An MdBlockElement representing the code block.