Lines package:hledger-lib

Add a prefix to each line of a string.
Add a prefix to the first line of a string, and a different prefix to the remaining lines.
any final trailing comments in the (main) journal file
Helper for showMixedAmountB (and postingAsLines, ...) to show a list of Amounts on multiple lines. This returns the list of WideBuilders: one for each Amount, and padded/elided to the appropriate width. This does not honour displayOneLine; all amounts will be displayed as if displayOneLine were False.
Like showMixedAmountLinesB but also returns the amounts associated with each text builder.
Render one posting, on one or more lines, suitable for print output. Also returns the widths calculated for the account and amount fields. There will be an indented account name, plus one or more of status flag, posting amount, balance assertion, same-line comment, next-line comments. If the posting's amount is implicit or if elideamount is true, no amount is shown. If the posting's amount is explicit and multi-commodity, multiple similar postings are shown, one for each commodity, to help produce parseable journal syntax. Or if onelineamounts is true, such amounts are shown on one line, comma-separated (and the output will not be valid journal syntax). If an amount is zero, any commodity symbol attached to it is shown (and the corresponding commodity display style is used). By default, 4 spaces (2 if there's a status flag) are shown between account name and start of amount area, which is typically 12 chars wide and contains a right-aligned amount (so 10-12 visible spaces between account name and amount is typical). When given a list of postings to be aligned with, the whitespace will be increased if needed to match the posting with the longest account name. This is used to align the amounts of a transaction's postings.
Render a transaction's postings as indented lines, suitable for print output. Normally these will be in valid journal syntax which hledger can reparse (though they may include no-longer-valid balance assertions). Explicit amounts are shown, implicit amounts are not. Postings with multicommodity explicit amounts are handled as follows: if onelineamounts is true, these amounts are shown on one line, comma-separated, and the output will not be valid journal syntax. Otherwise, they are shown as several similar postings, one per commodity. When the posting has a balance assertion, it is attached to the last of these postings. Posting amounts will be aligned with each other, starting about 4 columns beyond the widest account name (see postingAsLines for details). The postings will appear balanced (amounts summing to zero). Amounts' display precisions, which may have been limited by commodity directives, will be increased if necessary to ensure this.
Render a transaction or posting's comment as indented, semicolon-prefixed comment lines. The first line (unless empty) will have leading space, subsequent lines will have a larger indent.
Render a posting, at the appropriate width for aligning with its siblings if any. Used by the rewrite command.
Join a list of Text Builders with a newline after each item.
The same as Tab.Properties, but has Eq and Ord instances. We need those for storing NumLines in Sets.