rins_markdown_parser

Function to_html

Source
pub fn to_html(pair: Pair<'_, Rule>) -> Result<String, ErrorParse>
Expand description

Converts a pest::iterators::Pair representing a single rule into an HTML string.

§Arguments

  • pair - A pest::iterators::Pair representing the parsed rule to convert.

§Errors

  • Returns an ErrorParse::ParsingError if there’s an error during a parsing process.

§Returns

A result containing either the corresponding HTML string or an ErrorParse if the rule is unknown or an error occurs.