HEX
Server: Apache/2.4.67 (Debian)
System: Linux vps-b2547eb4 6.1.0-41-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/markdown_it/__pycache__/utils.cpython-311.pyc
�

�&d���V�ddlmZddlmZddlmZGd�de��Zdd
�Zdd�Z	dS)�)�annotations)�Callable)�Pathc��eZdZdZedd���Zejdd���Zedd���Zejdd	���Zedd
���Zejdd���Zedd���Z	e	jdd
���Z	edd���Z
e
jd d���Z
edd���Zejdd���Zedd���Zejdd���Zedd���Z
e
jd d���Z
ed!d���Zejd"d���ZdS)#�OptionsDictzMA dictionary, with attribute access to core markdownit configuration options.�return�intc��|dS)z%Internal protection, recursion limit.�
maxNesting���selfs �3/usr/lib/python3/dist-packages/markdown_it/utils.pyrzOptionsDict.maxNesting
����L�!�!��valuec��||d<dS)Nrr�rrs  rrzOptionsDict.maxNesting���"��\���r�boolc��|dS)zEnable HTML tags in source.�htmlrr
s rrzOptionsDict.htmls���F�|�rc��||d<dS)Nrrrs  rrzOptionsDict.htmls����V���rc��|dS)z1Enable autoconversion of URL-like texts to links.�linkifyrr
s rrzOptionsDict.linkifys���I��rc��||d<dS)Nrrrs  rrzOptionsDict.linkify!s����Y���rc��|dS)z$Enable smartquotes and replacements.�typographerrr
s rrzOptionsDict.typographer%s���M�"�"rc��||d<dS)Nrrrs  rrzOptionsDict.typographer*s��#��]���r�strc��|dS)zQuote characters.�quotesrr
s rr"zOptionsDict.quotes.����H�~�rc��||d<dS)Nr"rrs  rr"zOptionsDict.quotes3�����X���rc��|dS)z&Use '/' to close single tags (<br />).�xhtmlOutrr
s rr'zOptionsDict.xhtmlOut7s���J��rc��||d<dS)Nr'rrs  rr'zOptionsDict.xhtmlOut<s�� ��Z���rc��|dS)z)Convert newlines in paragraphs into <br>.�breaksrr
s rr*zOptionsDict.breaks@r#rc��||d<dS)Nr*rrs  rr*zOptionsDict.breaksEr%rc��|dS)z&CSS language prefix for fenced blocks.�
langPrefixrr
s rr-zOptionsDict.langPrefixIrrc��||d<dS)Nr-rrs  rr-zOptionsDict.langPrefixNrr�%Callable[[str, str, str], str] | Nonec��|dS)zEHighlighter function: (content, langName, langAttrs) -> escaped HTML.�	highlightrr
s rr1zOptionsDict.highlightRs���K� � rc��||d<dS)Nr1rrs  rr1zOptionsDict.highlightWs��!��[���rN)rr	)rr	)rr)rr)rr )rr )rr/)rr/)�__name__�
__module__�__qualname__�__doc__�propertyr�setterrrrr"r'r*r-r1rrrrrsr������W�W�
�"�"�"��X�"���#�#�#���#������X��
�[�����[�������X��
�^� � � ��^� ��#�#�#��X�#���$�$�$���$������X���]�����]��� � � ��X� ��_�!�!�!��_�!������X���]�����]���"�"�"��X�"���#�#�#���#��!�!�!��X�!���"�"�"���"�"�"rr�path�
str | Pathr�
list[list]c�~�t|���d���}g}d}d}|�d���}tt	|����D]�}||���dkr�|dkr5|�|||dz
���g��d}n�|dkr<|d�d	�||dz|�����d
}nA|d
kr;|d�d	�||dz|�����d}|}��|S)Nzutf-8)�encodingrT)�keepends�.������)	r�	read_text�
splitlines�range�len�rstrip�append�strip�join)r9�text�tests�section�last_pos�lines�is       r�read_fixture_filerR\s>����:�:�����1�1�D��E��G��H��O�O�T�O�*�*�E�
�3�u�:�:�
�
������8�?�?����#�#��!�|�|����a��q�1�u��!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�stringr �suffixc�d�|r-|�|��r|dt|���S|S)z�Remove a suffix from a string.

    Replace this with str.removesuffix() from stdlib when minimum Python
    version is 3.9.
    N)�endswithrG)rSrTs  r�
_removesuffixrWrs;���&�&�/�/�&�)�)�&��n��V����n�%�%��MrN)r9r:rr;)rSr rTr rr )
�
__future__r�collections.abcr�pathlibr�dictrrRrWrrr�<module>r\s���"�"�"�"�"�"�$�$�$�$�$�$�������R"�R"�R"�R"�R"�$�R"�R"�R"�j����,�����r