Expand description
Beancount file formatter.
Provides pretty-printing for beancount directives with configurable amount alignment.
Structs§
- Format
Config - Formatter configuration.
Enums§
- Alignment
- How to choose the alignment column for amounts.
- Format
Line - A single rendered output line, classified for alignment.
Functions§
- escape_
string - Escape a string for output (handle quotes and backslashes).
- format_
directive_ lines - Render a directive into format lines (the render phase).
- format_
directives - Format a list of directives to a string, aligning all of them together against shared, file-wide column widths in a single pass.
- format_
posting_ line - Format the single-line representation of a posting, including the first same-line trailing comment.
- posting_
format_ line - Build the
FormatLinefor a single posting line. - render_
lines - Render a sequence of
FormatLines into a single string, aligning all amount-bearing lines against the file-wide widths implied byalignment. Every line is terminated with\n. - resolve_
alignment - Resolve
alignmentagainst a document’s full line set into a concrete alignment whose widths are fixed.