
äqVÇ  ã               @   sP   d  Z  d d l m Z m Z m Z m Z d d l Z d d l Z d d „  Z d S)zU
Helper for formatting exception messages. Exports the following items:

 - unwrap()
é    )Úunicode_literalsÚdivisionÚabsolute_importÚprint_functionNc             G   sY   t  j |  ƒ } | j d ƒ d k r9 t j d d | ƒ } | rI | | } | j ƒ  } | S)a_  
    Takes a multi-line string and does the following:

     - dedents
     - converts newlines with text before and after into a single line
     - strips leading and trailing whitespace

    :param string:
        The string to format

    :param *params:
        Params to interpolate into the string

    :return:
        The formatted string
    Ú
é   z(?<=\S)
(?=[^ 
	\d\*\-=])ú éÿÿÿÿ)ÚtextwrapÚdedentÚfindÚreÚsubÚstrip)ÚstringZparamsÚoutput© r   ú4/usr/lib/python3/dist-packages/asn1crypto/_errors.pyÚunwrap   s    
r   )	Ú__doc__Z
__future__r   r   r   r   r   r
   r   r   r   r   r   Ú<module>   s   "