
    eh7                        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
mZmZmZ e
rd dlmZ eeef         Z	  G d de          Z G d	 d
e          Z G d de          ZddZdS )    )annotations)CallableIterableMutableMapping)r   )Path)TYPE_CHECKINGAny	TypedDictcast)NotRequiredc                      e Zd ZU dZded<   	 ded<   	 ded<   	 ded<   	 ded	<   	 ded
<   	 ded<   	 ded<   	 ded<   	 ded<   dS )OptionsTypezOptions for parsing.int
maxNestingboolhtmllinkifytypographerstrquotesxhtmlOutbreaks
langPrefix%Callable[[str, str, str], str] | None	highlightzNotRequired[bool]store_labelsN__name__
__module____qualname____doc____annotations__     a/home/jenkins/workspace/simtester-sanitize/venv/lib/python3.11/site-packages/markdown_it/utils.pyr   r      s         OOO/JJJ%MMM;.KKKNNN0LLL3OOO04444>#### r$   r   c                  *    e Zd ZU dZded<   	 ded<   dS )
PresetTypez%Preset configuration for markdown-it.r   optionsz3MutableMapping[str, MutableMapping[str, list[str]]]
componentsNr   r#   r$   r%   r'   r'   .   s3         //CCCC//r$   r'   c                  \   e Zd ZdZd)dZd*d
Zd+dZd,dZd-dZd.dZ	d/dZ
d/dZed.d            Zej        d0d            Zed1d            Zej        d2d            Zed1d            Zej        d2d            Zed1d            Zej        d2d            Zed/d            Zej        d3d            Zed1d            Zej        d2d             Zed1d!            Zej        d2d"            Zed/d#            Zej        d3d$            Zed4d&            Zej        d5d'            Zd(S )6OptionsDictzMA dictionary, with attribute access to core markdownit configuration options.r(   r   returnNonec                T    t          t          t          |                    | _        d S N)r   r   dict_options)selfr(   s     r%   __init__zOptionsDict.__init__=   s    [$w--88r$   keyr   r	   c                    | j         |         S r/   r1   r2   r4   s     r%   __getitem__zOptionsDict.__getitem__@   s    }S!!r$   valuec                    || j         |<   d S r/   r6   )r2   r4   r9   s      r%   __setitem__zOptionsDict.__setitem__C   s    "cr$   c                    | j         |= d S r/   r6   r7   s     r%   __delitem__zOptionsDict.__delitem__F   s    M#r$   Iterable[str]c                *    t          | j                  S r/   )iterr1   r2   s    r%   __iter__zOptionsDict.__iter__I       DM"""r$   r   c                *    t          | j                  S r/   )lenr1   rA   s    r%   __len__zOptionsDict.__len__L       4=!!!r$   c                *    t          | j                  S r/   )reprr1   rA   s    r%   __repr__zOptionsDict.__repr__O   rC   r$   c                *    t          | j                  S r/   )r   r1   rA   s    r%   __str__zOptionsDict.__str__R   rG   r$   c                    | j         d         S )z%Internal protection, recursion limit.r   r6   rA   s    r%   r   zOptionsDict.maxNestingU        }\**r$   c                    || j         d<   d S )Nr   r6   r2   r9   s     r%   r   zOptionsDict.maxNestingZ       &+l###r$   r   c                    | j         d         S )zEnable HTML tags in source.r   r6   rA   s    r%   r   zOptionsDict.html^   s     }V$$r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.htmlc   s     %fr$   c                    | j         d         S )z1Enable autoconversion of URL-like texts to links.r   r6   rA   s    r%   r   zOptionsDict.linkifyg   s     }Y''r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.linkifyl   s    #(i   r$   c                    | j         d         S )z$Enable smartquotes and replacements.r   r6   rA   s    r%   r   zOptionsDict.typographerp   s     }]++r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.typographeru   s    ',m$$$r$   c                    | j         d         S )zQuote characters.r   r6   rA   s    r%   r   zOptionsDict.quotesy        }X&&r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.quotes~       "'hr$   c                    | j         d         S )z&Use '/' to close single tags (<br />).r   r6   rA   s    r%   r   zOptionsDict.xhtmlOut   s     }Z((r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.xhtmlOut   s    $)j!!!r$   c                    | j         d         S )z)Convert newlines in paragraphs into <br>.r   r6   rA   s    r%   r   zOptionsDict.breaks   rY   r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.breaks   r[   r$   c                    | j         d         S )z&CSS language prefix for fenced blocks.r   r6   rA   s    r%   r   zOptionsDict.langPrefix   rN   r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.langPrefix   rQ   r$   r   c                    | j         d         S )zEHighlighter function: (content, langName, langAttrs) -> escaped HTML.r   r6   rA   s    r%   r   zOptionsDict.highlight   s     }[))r$   c                    || j         d<   d S )Nr   r6   rP   s     r%   r   zOptionsDict.highlight   s    %*k"""r$   N)r(   r   r,   r-   )r4   r   r,   r	   )r4   r   r9   r	   r,   r-   )r4   r   r,   r-   )r,   r>   )r,   r   )r,   r   )r9   r   r,   r-   )r,   r   )r9   r   r,   r-   )r9   r   r,   r-   )r,   r   )r9   r   r,   r-   )r   r   r    r!   r3   r8   r;   r=   rB   rF   rJ   rL   propertyr   setterr   r   r   r   r   r   r   r   r#   r$   r%   r+   r+   7   s       WW
9 9 9 9" " " "# # # #   # # # #" " " "# # # #" " " " + + + X+ , , , , % % % X% 
[& & & [& ( ( ( X( ^) ) ) ^) , , , X, - - - - ' ' ' X' ]( ( ( ]( ) ) ) X) _* * * _* ' ' ' X' ]( ( ( ]( + + + X+ , , , , * * * X* + + + + + +r$   r+   path
str | Pathr,   list[list[Any]]c                ~   t          |                               d          }g }d}d}|                    d          }t          t	          |                    D ]}||                                         dk    r|dk    r5|                    |||dz
                                           g           d}n|dk    r<|d                             d	                    ||dz   |                              d
}nA|d
k    r;|d                             d	                    ||dz   |                              d}|}|S )Nzutf-8)encodingr   T)keepends.       )	r   	read_text
splitlinesrangerE   rstripappendstripjoin)rf   texttestssectionlast_poslinesis          r%   read_fixture_filer~      s>   ::11DEGHOOTO**E3u::  8??##!||aq1u!3!3!5!56777Ab	  x!|a/?)@!A!ABBBAb	  x!|a/?)@!A!ABBBHLr$   N)rf   rg   r,   rh   )
__future__r   collections.abcr   r   r   MutableMappingABCpathlibr   typingr   r	   r
   r   typing_extensionsr   r   EnvTyper   r'   r+   r~   r#   r$   r%   <module>r      sR   " " " " " " > > > > > > > > > > ? ? ? ? ? ?       6 6 6 6 6 6 6 6 6 6 6 6 .------ c
"
    )   80 0 0 0 0 0 0 0m+ m+ m+ m+ m+# m+ m+ m+`     r$   