[][src]Module parse_hyperlinks::parser

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

Modules

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 or RestructuredText format. ReStructuredText's anonymous links are not supported.

take_hyperlink

Consumes the input until it finds a Markdown or RestructuredText hyperlink. Returns Ok(remaining_input, (link_name, link_destination, link_title). The parser finds stand alone links and link references. ReStructuredText's anonymous links are not supported.