mermaid.label.wrap

mermaid.label

wrap(lines, max_cols) -> lines

Wrap a label's lines to a width

Breaks each line at its spaces so that no line is wider than max_cols columns. A word wider than that is cut at the column. A character wider than max_cols stays whole, on a line of its own. A line that fits comes back as it is.