Skip to main content

Module markdown

Module markdown 

Source
Expand description

Markdown conversion. Unlike the text path, markdown keeps links inline as [text](url) for maximum fidelity — the right trade-off when the consumer wants a faithful, re-renderable document rather than minimal tokens.

Links are still collected into a reference list, so a --json caller gets the same recoverable URLs the text path gives it; and the same schemes the text path refuses (javascript:, mailto:, in-page anchors) are left as plain text rather than emitted as live markdown links.

Functions§

html_to_markdown
markdown_with_refs for callers holding raw HTML.
markdown_with_refs
Convert a parsed document to markdown, also returning the links it contains.