Skip to main content

Module markdown

Module markdown 

Source
Expand description

Markdown link extraction and resolution.

Functions§

extract_links
Extract inline and reference-style link targets from body, in order of appearance. Image links are excluded. Fragments are kept as-is.
resolve_link
Resolve target (a link found in doc_path, a repo-relative /-separated path) into a normalized repo-relative path. Returns None for external URLs, absolute paths, anchor-only targets, or targets that escape the repo. The fragment (if any) is stripped from the result.