HEX
Server: Apache
System: Linux srv1.prosuiteplus.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: prosuiteplus (1001)
PHP: 8.3.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/docutils/transforms/__pycache__/writer_aux.cpython-38.pyc
U

�w#[1
�@sLdZdZddlmZmZmZddlmZGdd�de�ZGdd�de�Z	d	S)
z�
Auxiliary transforms mainly to be used by Writer components.

This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::

    from docutils import writers
    from docutils.transforms import writers
ZreStructuredText�)�nodes�utils�	languages)�	Transformc@seZdZdZdZdd�ZdS)�Compounda
    Flatten all compound paragraphs.  For example, transform ::

        <compound>
            <paragraph>
            <literal_block>
            <paragraph>

    into ::

        <paragraph>
        <literal_block classes="continued">
        <paragraph classes="continued">
    i�cCs\|j�tj�D]H}d}|D](}|r4t|tj�sBd}q|d�d�q|�|dd��qdS)NTF�classes�	continued)�document�traverser�compound�
isinstanceZ	Invisible�append�replace_self)�selfrZfirst_childZchild�r�@/usr/lib/python3/dist-packages/docutils/transforms/writer_aux.py�apply(szCompound.applyN��__name__�
__module__�__qualname__�__doc__Zdefault_priorityrrrrrrsrc@seZdZdZdZdd�ZdS)�AdmonitionsaZ
    Transform specific admonitions, like this:

        <note>
            <paragraph>
                 Note contents ...

    into generic admonitions, like this::

        <admonition classes="note">
            <title>
                Note
            <paragraph>
                Note contents ...

    The admonition title is localized.
    i�cCs�t�|jjj|jj�}|j�tj�D]f}|j	j
}|d�|�t|tj
�s$tj
|jf|j�|j�}t�d|j|�}|�d|�|�|�q$dS)Nr�r)rZget_languager	ZsettingsZ
language_codeZreporterr
rZ
Admonition�	__class__rr
r�
admonitionZ	rawsourceZchildrenZ
attributes�title�labels�insertr)rZlanguageZnodeZ	node_namerrrrrrKs��zAdmonitions.applyNrrrrrr5srN)
rZ
__docformat__ZdocutilsrrrZdocutils.transformsrrrrrrr�<module>s