
    _dR                     ^    d Z ddlZddlZddlmZ ddlmZ ddlmZ d Zddede	d	ee   fd
Z
y)z*
Utilities imported from ipython_genutils
    N)dedent)indent)Listc                     t        | d      }|S )Nz    )_indent)valress     6/usr/lib/python3/dist-packages/traitlets/utils/text.pyr   r      s    
#v
CJ    textncolsreturnc                 x   t        j                  dt         j                        }t        |       j	                         } |j                  |       ddd   }g }t        j                  dt         j                        }|D ]:  }|j                  |      t        j                  ||      }|j                  |       < |S )a  Wrap multiple paragraphs to fit a specified width.

    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.
    z
\n(\s*\n)+N   z\n\s+)
recompile	MULTILINEr   stripsplitsearchtextwrapfillappend)r   r   paragraph_re
paragraphsout_ps	indent_reps          r
   wrap_paragraphsr      s     ::mR\\:L$<D##D)#A#.JF

8R\\2I  A&a'Aa Mr   )P   )__doc__r   r   r   r   r   typingr   strintr    r   r
   <module>r&      s>    
   & 
# c 49 r   