
    Lc                         d dl mZ d dlmZ d dlmZ d dlmZmZ d dl	m
Z
 d dlmZmZmZmZ dd
Z eddg d          ZddZ g dZdZd	S )   )Markdown)BlockParser)InlineParser)AstRendererHTMLRenderer)PLUGINS)escape
escape_urlescape_htmlunikeyTFNc                 J   ||dk    rt          |           }n|dk    rt                      }|rTg }|D ]M}t          |t                    r!|                    t
          |                    8|                    |           N|}t          |t          ||          |          S )a  Create a Markdown instance based on the given condition.

    :param escape: Boolean. If using html renderer, escape html.
    :param hard_wrap: Boolean. Break every new line into ``<br>``.
    :param renderer: renderer instance or string of ``html`` and ``ast``.
    :param plugins: List of plugins, string or callable.

    This method is used when you want to re-use a Markdown instance::

        markdown = create_markdown(
            escape=False,
            renderer='html',
            plugins=['url', 'strikethrough', 'footnotes', 'table'],
        )
        # re-use markdown function
        markdown('.... your text ...')
    Nhtml)r	   ast)	hard_wrap)inlineplugins)r   r   
isinstancestrappendr   r   r   )r	   r   rendererr   _pluginsps         0lib/python3.11/site-packages/mistune/__init__.pycreate_markdownr   	   s    $  !8v- !v...	U	 !==  	# 	#A!S!! #
++++""""H\(i%P%P%PZabbbb    r   )strikethrough	footnotestabler	   r   r   c                 <    t          |||          } ||           S )Nr   )r   )textr	   r   r   mds        r   markdownr#   3   s#    	7	K	K	KB2d88Or   )r   r   r   r   r   r	   r
   r   r   r   r   r#   z2.0.4)TFNN)TNN)r#   r   block_parserr   inline_parserr   	renderersr   r   r   r   utilr	   r
   r   r   r   r   __all____version__ r   r   <module>r+      s          % % % % % % ' ' ' ' ' ' 0 0 0 0 0 0 0 0       9 9 9 9 9 9 9 9 9 9 9 9 c  c  c  cF 333     
   r   