
    f;                          d Z ddlZddlZddZy)zText related utils.    Nc                 F   | yd|z  d|z  z   }|r$t        j                  dt         j                        n#t        j                  dt         j                        }t        j                  |||       }|j	                  t
        j                  |z         r|dt        |        S |S )a  Indent a string a given number of spaces or tabstops.

    indent(str,nspaces=4,ntabs=0) -> indent str by ntabs+nspaces.

    Parameters
    ----------

    instr : basestring
        The string to be indented.
    nspaces : int (default: 4)
        The number of spaces to be indented.
    ntabs : int (default: 0)
        The number of tabs to be indented.
    flatten : bool (default: False)
        Whether to scrub existing indentation.  If True, all lines will be
        aligned to the same indentation.  If False, existing indentation will
        be strictly increased.

    Returns
    -------

    str|unicode : string indented by ntabs and nspaces.

    N	 z^\s*^)recompile	MULTILINEsubendswithoslineseplen)instrnspacesntabsflattenindpatoutstrs          O/var/www/cvtools/html/venv/lib/python3.12/site-packages/nbconvert/utils/text.pyindentr      s    2 }
,w
&C/6"**Wbll
+BJJsBLL<YCVVCe$FrzzC'(kS	""M    )   r   F)__doc__r   r   r    r   r   <module>r      s     	 	 r   