Expand description
Parsing for links, images, and automatic links.
Implements:
- Automatic links:
<http://example.com>and<user@example.com> - Inline links:
[text](url)and[text](url "title") - Link attributes:
[text](url){#id .class key=value} - Inline images:
and - Image attributes:
{#id .class key=value} - Reference links:
[text][ref],[text][],[text] - Reference images:
![alt][ref],![alt][],![alt]
Structs§
- Link
Scan Context - Flags that control which inline spans the link-bracket scanner treats as
opaque (so a
]inside them does not terminate the link/image text).
Functions§
- emit_
autolink - Emit an automatic link node to the builder.
- emit_
bare_ uri_ link - emit_
inline_ image - Emit an inline image node to the builder. Note: alt_text may contain inline elements and should be parsed recursively.
- emit_
inline_ link - Emit an inline link node to the builder. Note: link_text may contain inline elements and should be parsed recursively.
- emit_
reference_ image - Emit a reference image node with registry lookup.
- emit_
reference_ link - Emit a reference link node to the builder. Preserves the original reference syntax (explicit [text][ref], implicit [text][], or shortcut [text]).
- emit_
unresolved_ reference - Emit an
UNRESOLVED_REFERENCEnode for a Pandoc bracket-shape pattern whose label didn’t resolve. The wrapper covers the original bracket bytes; the inner text recurses through normal inline parsing (with inner-link suppression so a stray inner inline link doesn’t reorder semantics relative to pandoc-native). - try_
parse_ autolink - Try to parse an automatic link starting at the current position.
- try_
parse_ bare_ uri - try_
parse_ inline_ image - Try to parse an inline image starting at the current position.
- try_
parse_ inline_ link - Try to parse an inline link starting at the current position.
- try_
parse_ reference_ image - Try to parse a reference-style image:
![alt][ref],![alt][], or![alt]Returns (total_len, alt_text, label, is_shortcut) if successful. - try_
parse_ reference_ link - Try to parse a reference link starting at the current position.