[][src]Module parse_hyperlinks::parser

This module implements parsers to extract all hyperlinks from a text input.

Modules

asciidoc

This module implements parsers for standalone Asciidoc hyperlinks. Link references are not supported.

html

This module implements parsers for HTML hyperlinks. The code follows HTML 5.2: 4.5.

markdown

This module implements parsers for Markdown hyperlinks.

restructured_text

This module implements parsers for RestructuredText hyperlinks.

Functions

first_hyperlink

Searches for hyperlinks in the input text and returns the first finding as tuple: Some((link_name, link_destination, link_title)) The function recognizes hyperlinks in Markdown, RestructuredText or HTML format. See function take_hyperlink() for limitations.

take_hyperlink

Consumes the input until it finds a Markdown, RestructuredText, Asciidoc or HTML hyperlink. Returns Ok(remaining_input, (link_name, link_destination, link_title). The parser finds stand alone links and link references.