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((bytes_consumed, label, url, title)) on success.
- try_
parse_ reference_ definition_ lax - Multimarkdown-flavored variant: tolerates trailing content after the title
on the same line (e.g.
[ref]: /url "title" width=20px ...). Callers in the MMD code path then keep collecting attribute-continuation lines.