HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/markdown_it/__pycache__/utils.cpython-310.pyc
o

;j��@s�ddlmZddlmZddlmZddlmZm	Z	m
Z
mZmZmZee
efZ	Gdd�de�ZGdd�de�ZGd	d
�d
e�Zddd�ZdS)�)�annotations)�MutableMapping)�Path)�Any�Callable�Iterabler�	TypedDict�castc@sjeZdZUdZded<	ded<	ded<	ded<	ded	<	ded
<	ded<	ded<	d
ed<dS)�OptionsTypezOptions for parsing.�int�
maxNesting�bool�html�linkify�typographer�str�quotes�xhtmlOut�breaks�
langPrefix�%Callable[[str, str, str], str] | None�	highlightN��__name__�
__module__�__qualname__�__doc__�__annotations__�rr�E/opt/saltstack/salt/lib/python3.10/site-packages/markdown_it/utils.pyr

s(
r
c@s$eZdZUdZded<	ded<dS)�
PresetTypez%Preset configuration for markdown-it.r
�optionsz3MutableMapping[str, MutableMapping[str, list[str]]]�
componentsNrrrrrr $s
r c@sneZdZdZd:dd�Zd;dd�Zd<dd�Zd=dd�Zd>dd�Zd?dd�Z	d@dd�Z
d@dd�Zed?dd��Z
e
jdAdd��Z
edBd d!��ZejdCd"d!��ZedBd#d$��ZejdCd%d$��ZedBd&d'��ZejdCd(d'��Zed@d)d*��ZejdDd+d*��ZedBd,d-��ZejdCd.d-��ZedBd/d0��ZejdCd1d0��Zed@d2d3��ZejdDd4d3��ZedEd6d7��ZejdFd8d7��Zd9S)G�OptionsDictzMA dictionary, with attribute access to core markdownit configuration options.r!r
�return�NonecCsttt|��|_dS�N)r	r
�dict�_options)�selfr!rrr�__init__3szOptionsDict.__init__�keyrrcCs
|j|Sr&�r(�r)r+rrr�__getitem__6�
zOptionsDict.__getitem__�valuecCs||j|<dSr&r,)r)r+r0rrr�__setitem__9szOptionsDict.__setitem__cCs|j|=dSr&r,r-rrr�__delitem__<szOptionsDict.__delitem__�
Iterable[str]cC�
t|j�Sr&)�iterr(�r)rrr�__iter__?r/zOptionsDict.__iter__rcCr4r&)�lenr(r6rrr�__len__Br/zOptionsDict.__len__cCr4r&)�reprr(r6rrr�__repr__Er/zOptionsDict.__repr__cCr4r&)rr(r6rrr�__str__Hr/zOptionsDict.__str__cC�
|jdS)z%Internal protection, recursion limit.rr,r6rrrrK�
zOptionsDict.maxNestingcC�||jd<dS)Nrr,�r)r0rrrrP�r
cCr=)zEnable HTML tags in source.rr,r6rrrrTr>zOptionsDict.htmlcCr?)Nrr,r@rrrrYrAcCr=)z1Enable autoconversion of URL-like texts to links.rr,r6rrrr]r>zOptionsDict.linkifycCr?)Nrr,r@rrrrbrAcCr=)z$Enable smartquotes and replacements.rr,r6rrrrfr>zOptionsDict.typographercCr?)Nrr,r@rrrrkrAcCr=)zQuote characters.rr,r6rrrror>zOptionsDict.quotescCr?)Nrr,r@rrrrtrAcCr=)z&Use '/' to close single tags (<br />).rr,r6rrrrxr>zOptionsDict.xhtmlOutcCr?)Nrr,r@rrrr}rAcCr=)z)Convert newlines in paragraphs into <br>.rr,r6rrrr�r>zOptionsDict.breakscCr?)Nrr,r@rrrr�rAcCr=)z&CSS language prefix for fenced blocks.rr,r6rrrr�r>zOptionsDict.langPrefixcCr?)Nrr,r@rrrr�rArcCr=)zEHighlighter function: (content, langName, langAttrs) -> escaped HTML.rr,r6rrrr�r>zOptionsDict.highlightcCr?)Nrr,r@rrrr�rAN)r!r
r$r%)r+rr$r)r+rr0rr$r%)r+rr$r%)r$r3)r$r)r$r)r0rr$r%)r$r
)r0r
r$r%)r0rr$r%)r$r)r0rr$r%)rrrrr*r.r1r2r7r9r;r<�propertyr�setterrrrrrrrrrrrrr#-s\







r#�path�
str | Pathr$�list[list[Any]]cCs�t|�jdd�}g}d}d}|jdd�}tt|��D]M}||��dkrg|dkr8|�|||d��g�d}n-|dkrO|d�d	�||d|���d
}n|d
kre|d�d	�||d|���d}|}q|S)Nzutf-8)�encodingrT)�keepends�.������)	r�	read_text�
splitlines�ranger8�rstrip�append�strip�join)rD�textZtests�sectionZlast_pos�lines�irrr�read_fixture_file�s&  �rYN)rDrEr$rF)�
__future__r�collections.abcrZMutableMappingABC�pathlibr�typingrrrrr	rZEnvTyper
r r#rYrrrr�<module>s 	p