Expand description
Link- and footnote-reference tables. CM 4.7 + 6.3 + GFM footnotes
require a two-pass parse: first walk the token stream to harvest all
definitions, then resolve [label] / [text][label] / [label][]
references against the table during the main parse.
Structs§
- RefMap
- Lookup table built once per parse.
Functions§
- normalize_
label - CM 4.7: case-insensitive comparison, internal whitespace collapsed
to single spaces, leading/trailing whitespace trimmed. Backslash
escapes resolve before comparison so
[Foo\]]andFoo]match. - parse_
link_ ref_ def - Parse the raw lexeme of a
LinkRefDeftoken into(label, url, title). ReturnsNoneon malformed input; the lexer already validated the gross structure ([label]:plus a non-empty destination), so failures here mostly mean a missing]or:.
Type Aliases§
- LinkRef
- Resolved link reference: destination URL plus optional title.