Function termimad::wrap::hard_wrap_lines

source ·
pub fn hard_wrap_lines<'s>(
    src_lines: Vec<FmtLine<'s>>,
    width: usize,
    skin: &MadSkin
) -> Result<Vec<FmtLine<'s>>, InsufficientWidthError>
Expand description

hard_wrap all normal lines to ensure the text fits the width. Doesn’t touch table rows. Consumes the passed array and return a new one (may contain the original lines, avoiding cloning when possible). Return an error if the width is less than 3.