Hacked By AnonymousFox

Current Path : /opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/__pycache__/misc.cpython-311.pyc

�

j��f	��z�dZdZddlmZddlmZGd�de��ZGd�de��ZGd	�d
e��ZdS)z
Miscellaneous transforms.
�reStructuredText�)�nodes)�	Transformc��eZdZdZdZd�ZdS)�CallBacka�
    Inserts a callback into a document.  The callback is called when the
    transform is applied, which is determined by its priority.

    For use with `nodes.pending` elements.  Requires a ``details['callback']``
    entry, a bound method or function which takes one parameter: the pending
    node.  Other data can be stored in the ``details`` attribute or in the
    object hosting the callback method.
    i�c�t�|j}|jd|��|j�|��dS)N�callback)�	startnode�details�parent�remove)�self�pendings  �x/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/misc.py�applyzCallBack.applys<���.��#���
�#�G�,�,�,�����g�&�&�&�&�&�N��__name__�
__module__�__qualname__�__doc__�default_priorityr�rrrrs5����������'�'�'�'�'rrc��eZdZdZdZd�ZdS)�ClassAttributez|
    Move the "class" attribute specified in the "pending" node into the
    immediately following non-comment element.
    ��c�b�|j}|j}|}|r�t|�|��dzt	|����D]v}||}t|tj��st|tj��r�?|dxx|j	dz
cc<|j�
|��dS|}|j}|��|jj�
d|j	dzt
j|j|j��|j���}|�|��dS)N��classes�classz,No suitable element following "%s" directive�	directive��line)r
r�range�index�len�
isinstancer�	Invisible�system_messagerr
�document�reporter�error�
literal_block�	rawsourcer#�replace_self)rrr�childr%�elementr,s       rrzClassAttribute.apply,sD���.��������
	'��v�|�|�E�2�2�Q�6��F���D�D�
'�
'�� ��-���w���8�8��!�'�5�+?�@�@����	�"�"�"�g�o�g�&>�>�"�"�"���%�%�g�.�.�.����������
	'��
�&�,�,�:��o�k�*�
+���� 1�7�3D�E�E���	-����
	���U�#�#�#�#�#rNrrrrrr#s5��������
��$�$�$�$�$rrc�"�eZdZdZdZd�Zd�ZdS)�Transitionsa�
    Move transitions at the end of sections up the tree.  Complain
    on transitions after a title, at the beginning or end of the
    document, and after another transition.

    For example, transform this::

        <section>
            ...
            <transition>
        <section>
            ...

    into this::

        <section>
            ...
        <transition>
        <section>
            ...
    i>c�~�|j�tj��D]}|�|���dS)N)r*�findallr�
transition�visit_transition)r�nodes  rrzTransitions.apply`sE���M�)�)�%�*:�;�;�	(�	(�D��!�!�$�'�'�'�'�	(�	(rc��|j�|��}d}|dksVt|jdtj��r�|dks+t|jdtj��rs|dkrmt|jtj��s!t|jtj��sJ�|jj�	d|j
|j���}nTt|j|dz
tj��r,|jj�	d|j
|j���}|r |j�
||��|dz
}|t|j��ksJ�|t|j��dz
krdS|}|t|j��dz
kr�|j}|j�^|jj�	d|j���}|j�
|j�|��dz|��dS|j�|��}|t|j��dz
k��|j�|��|j�
|dz|��dS)	Nrr�z4Document or section may not begin with a transition.)�sourcer#zZAt least one body element must separate transitions; adjacent transitions are not allowed.z'Document may not end with a transition.r")rr%r'r�title�subtitler*�sectionr+r,r;r#r6�insertr&r
)rr8r%r,�siblings     rr7zTransitions.visit_transitiondsx����!�!�$�'�'�����Q�J�J��$�+�a�.�%�+�6�6�
��!����t�{�1�~�u�~�>�>���a�Z�Z��t�{�E�N�;�;�
?�!�$�+�u�}�=�=�
?�
?�>��M�*�0�0�F��{���1�4�4�E�E����E�A�I�.��0@�
A�
A�	4��M�*�0�0�8��{���1�4�4�E��	��K���u�e�,�,�,��Q�J�E��s�4�;�'�'�'�'�'�'��C���$�$�q�(�(�(��F����s�7�>�*�*�Q�.�.�.��n�G��~�%��
�.�4�4�=���5�$�$����"�"�4�;�#4�#4�T�#:�#:�Q�#>��F�F�F����N�(�(��1�1�E��s�7�>�*�*�Q�.�.�.�	
����4� � � �����e�a�i��.�.�.�.�.rN)rrrrrrr7rrrr3r3FsD��������,��(�(�(�,/�,/�,/�,/�,/rr3N)	r�
__docformat__�docutilsr�docutils.transformsrrrr3rrr�<module>rDs���
��#�
�������)�)�)�)�)�)�'�'�'�'�'�y�'�'�'�( $� $� $� $� $�Y� $� $� $�FJ/�J/�J/�J/�J/�)�J/�J/�J/�J/�J/r

Hacked By AnonymousFox1.0, Coded By AnonymousFox