o
    i                     @   s   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
dZeddg ddZdddZ g dZdZd	S )   )Markdown)BlockParser)InlineParser)AstRendererHTMLRenderer)PLUGINS)escape
escape_urlescape_htmlunikeyTFNc                 C   sz   |du s|dkrt | d}n|dkrt }|r2g }|D ]}t|tr*|t|  q|| q|}t|t||d|d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p r   K/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/mistune/__init__.pycreate_markdown	   s   
r   r   )strikethrough	footnotestabler   r   r   c                 C   s   t |||d}|| S )Nr   )r   )textr   r   r   mdr   r   r   markdown3   s   r    )r   r   r   r   r   r   r	   r
   r   r   r   r    z2.0.5)TFNN)TNN)r    r   block_parserr   inline_parserr   	renderersr   r   r   r   utilr   r	   r
   r   r   r   __all____version__r   r   r   r   <module>   s    
#
