Documentation
¶
Overview ¶
Package render turns a model.Document into one of three serializations behind a single Renderer interface: canonical JSON (the schema-stable contract the cache and Python wrapper read), Markdown (the LLM- and human-facing view), and plain text. Renderers are total functions over the model — they never re-extract or re-decide anything, and a null cell renders as JSON null, an empty Markdown cell, or a blank text column, never as 0.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnknownFormat = errors.New("render: unknown format")
ErrUnknownFormat is returned by For when the format name is not recognized.
Functions ¶
This section is empty.
Types ¶
type JSON ¶
type JSON struct{}
JSON renders the canonical, schema-stable serialization: deterministic field order (from the struct tags), HTML left unescaped so free text stays readable, and a trailing newline. This is the format the cache stores and the differ and Python wrapper read.
type Markdown ¶
type Markdown struct{}
Markdown renders the LLM- and human-facing view: a document heading, each section as a `##` heading with its free text and tables, the financial statements as right-aligned Markdown tables, and a compact provenance footer.