
    f	                         U d Z ddlmZ ddlmZmZmZ ddlmZ ddl	m
Z
 ddlmZ ddlmZmZmZmZ ddlmZ ddededefdZ ed	g d      Zeed
<   i ZddefdZg dZdZdZy)z
    mistune
    ~~~~~~~

    A fast yet powerful Python Markdown parser with renderers and
    plugins, compatible with sane CommonMark rules.

    Documentation: https://mistune.lepture.com/
   )Markdown)
BlockStateInlineStateBaseRenderer)BlockParser)InlineParser)HTMLRenderer)escape
escape_urlsafe_entityunikey)import_pluginFhtmlNr
   	hard_wrapreturnc                     |dk(  rd}n|dk(  rt        |       }t        |      }||D cg c]  }t        |       }}t        |||      S c c}w )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, default is HTMLRenderer.
    :param plugins: List of plugins.

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

        markdown = create_markdown(
            escape=False,
            hard_wrap=True,
        )
        # re-use markdown function
        markdown('.... your text ...')
    astNr   )r
   )r   )rendererinlineplugins)r	   r   r   r   )r
   r   r   r   r   ns         K/var/www/cvtools/html/venv/lib/python3.12/site-packages/mistune/__init__.pycreate_markdownr      s_    " 5	V	v.I.F-45=#55XfgFF 6s   A)strikethrough	footnotestablespeedup)r
   r   c                     |dk(  rd }|||f}|t         v rt        |   |       S t        |||      }|t         |<    ||       S )Nr   )r
   r   r   )__cached_parsersr   )textr
   r   r   keymds         r   markdownr#   :   sV    58W
%C
$T**	7	KBSd8O    )r   r	   r   r   r   r   r   r
   r   r   r   r   r   r#   z3.0.2zhttps://mistune.lepture.com/)TFr   N)Tr   N)__doc__r#   r   corer   r   r   block_parserr   inline_parserr   renderers.htmlr	   utilr
   r   r   r   r   r   boolr   r   __annotations__r   str__all____version____homepage__ r$   r   <module>r2      s     7 7 % ' ( 9 9 "GD G$ G`h G: !>h   #  -r$   