bundles / traitlets 5.15.0 / traitlets / utils / text / wrap_paragraphs
function
traitlets.utils.text:wrap_paragraphs
source: /traitlets/utils/text.py :34
Signature
def wrap_paragraphs ( text : str , ncols : int = 80 ) → list[str] Summary
Wrap multiple paragraphs to fit a specified width.
Extended Summary
This is equivalent to textwrap.wrap, but with support for multiple paragraphs, as separated by empty lines.
Returns
: list of complete paragraphs, wrapped to fill `ncols` columns.
Aliases
-
traitlets.config.wrap_paragraphs