Anydoc.Document (anydoc_ex v0.1.0)

Copy Markdown View Source

A parsed document: its rendered Markdown and the bytes of everything it embedded.

Markdown cannot embed bytes, so an embedded image renders as its alt text in :markdown while the raw payload stays available in :assets, tagged with its media type and the package part it came from. Images that carry an external URL render as ordinary Markdown images instead.

Scope

The upstream Rust crate exposes a full block-level document model (headings, tables, lists, notes). This binding does not mirror that tree yet: a Document carries the rendered Markdown plus the embedded assets, which covers the common "Markdown and images" pipeline. The full model is a candidate for a future release.

Summary

Types

t()

@type t() :: %Anydoc.Document{assets: [Anydoc.Asset.t()], markdown: String.t()}