[][src]Module parse_hyperlinks::parser

This module implements parsers to extract hyperlinks and link reference definitions from text input.

Modules

asciidoc

This module implements parsers for Asciidoc hyperlinks.

html

This module implements parsers for HTML hyperlinks.

markdown

This module implements parsers for Markdown hyperlinks.

restructured_text

This module implements parsers for RestructuredText hyperlinks.

Enums

Link

A link can be an inline link, a reference link or a link reference definition. This is the main return type of this API.

Functions

first_hyperlink

Searches for the first hyperlink or link reference definition in the input text and returns the finding as a tuple: Some((link_text_or_label, link_destination, link_title)) The function recognizes hyperlinks in Markdown, RestructuredText, Asciidoc or HTML format. See function take_inline_or_ref_def_link() for limitations.

take_inline_or_ref_def_link

Consumes the input until it finds a Markdown, RestructuredText, Asciidoc or HTML inline hyperlink or link reference definition. Returns Ok((remaining_input, (link_text_or_label, link_destination, link_title))). The parser recognizes only stand alone inline links and link reference definitions, but no reference links.

take_link

Consumes the input until it finds an inline link, a reference link or a link reference definition. The parser consumes the finding and returns Ok((remaining_input, Link)) or some error.