The document as the caller's list of passages. Built by Cite.source/2,
which documents as and show. Only the meta keys show names reach the
model; the rest of meta stays with the caller.
Shown meta goes on the wire, so its values must be JSON: nil, booleans,
atoms, numbers, UTF-8 binaries, and lists and plain maps of these, with
atom or binary keys.
Summary
Functions
Builds a source from units, each a text or %{text: text} with optional
:id and :meta. Text is kept byte for byte. Missing ids default to
P000, P001, and so on. Raises ArgumentError on a unit, id, text,
shown meta value, or option it cannot use.
Types
@type t() :: %Cite.Source{ as: String.t(), passages: [Cite.Passage.t()], show: [atom() | String.t()] }
Functions
Builds a source from units, each a text or %{text: text} with optional
:id and :meta. Text is kept byte for byte. Missing ids default to
P000, P001, and so on. Raises ArgumentError on a unit, id, text,
shown meta value, or option it cannot use.