
    KcR                     f    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
dS )z*
Utilities imported from ipython_genutils
    N)dedent)indent)Listc                 &    t          | d          }|S )Nz    )_indent)valress     4lib/python3.11/site-packages/traitlets/utils/text.pyr   r      s    
#v

CJ    P   textncolsreturnc                    t          j        dt           j                  }t          |                                           } |                    |           ddd         }g }t          j        dt           j                  }|D ]A}|                    |          t          j        ||          }|	                    |           B|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\22I   A 	(a''AaMr   )r   )__doc__r   r   r   r   r   typingr   strintr     r   r
   <module>r&      s     
			        & & & & & &        
 # c 49      r   