pub fn build_lines(
config: Option<&Config>,
plugins: Option<(PluginRegistry, Arc<Engine>)>,
warn: impl FnMut(&str),
) -> Vec<Vec<LineItem>>Expand description
Build a list of segment lists, one per rendered line. Single-line
configs return a vec of length 1; multi-line configs return one
inner vec per [line.N] sub-table sorted by the parsed integer
key. Edge cases per docs/specs/config.md §Edge cases:
layout = "multi-line"without usable[line.N]sub-tables warns and falls back to single-line using[line].segments.layout = "single-line"(or unset) with[line.N]tables present warns and ignores the numbered tables.- Numbered keys that don’t parse as positive integers (e.g.
[line.foo]) warn and drop. - In multi-line mode with both
[line].segmentsand[line.N]present, the numbered tables win and[line].segmentsis ignored. The spec’s edge-case table doesn’t enumerate this combination; this is a builder-level precedence choice matching the principle that single-line callers should go throughbuild_segments.
Plugin segments can appear in at most one line per render: the
shared plugin lookup is consumed on first use. A plugin id
referenced again in a later line surfaces as “plugin ‘CompiledPlugin) is tracked separately.