Expand description
Plain text renderer for ChordPro documents.
This crate converts a parsed ChordPro AST (from chordsketch-chordpro) into
formatted plain text with chords aligned above their corresponding lyrics.
Constants§
- MAX_
WARNINGS - Maximum number of warnings the renderer will accumulate for a single
render pass. Re-exported from the canonical location in
chordsketch-chordpro::render_resultso existing downstream callers can keep importingchordsketch_render_text::MAX_WARNINGSunchanged (issue #1874). Maximum number of warnings any renderer accumulates for a single render pass (issue #1833). Without a cap, a pathological input such as one million malformed{transpose}lines would push the warnings vector to tens of megabytes.push_warningrefuses to exceed this limit and appends a single truncation marker the first time the cap is hit.
Functions§
- render
- Parse a ChordPro source string and render it to plain text.
- render_
song - Render a
SongAST to plain text. - render_
song_ with_ transpose - Render a
SongAST to plain text with an additional CLI transposition offset. - render_
song_ with_ warnings - Render a
SongAST to plain text, returning warnings programmatically. - render_
songs - Render multiple
Songs to plain text, separated by a blank line. - render_
songs_ with_ transpose - Render multiple
Songs to plain text with transposition. - render_
songs_ with_ warnings - Render multiple
Songs to plain text, returning warnings programmatically. - try_
render - Parse a ChordPro source string and render it to plain text.