Skip to main content

Module reference_links

Module reference_links 

Source
Expand description

Reference definition and footnote parsing functions.

Reference definitions have the form:

[label]: url "optional title"
[label]: url 'optional title'
[label]: url (optional title)
[label]: <url> "title"

Footnote definitions have the form:

[^id]: Footnote content here.
    Can continue on multiple lines
    as long as they're indented.

Functionsยง

line_is_mmd_link_attribute_continuation
try_parse_footnote_marker
Try to parse just the footnote marker [^id]: from a line. Returns Some((id, content_start_col)) if the line starts with a footnote marker.
try_parse_reference_definition
Try to parse a reference definition starting at the current position. Returns Some((length, label, url, title)) if successful.