Skip to main content

Module wrap

Module wrap 

Source

Functions§

composite_kind_widths
return the inherent widths related to the kind, the one of the first line (for example with a bullet) and the ones for the next lines (for example with quotes)
hard_wrap_composite
cut the passed composite in several composites fitting the given visible width (which might be bigger or smaller than the length of the underlying string). width can’t be less than 3.
hard_wrap_lines
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.