| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/docutils/transforms/__pycache__/ |
Upload File : |
a
OԼa/
� @ sL d Z dZddlmZmZmZ ddlmZ G dd� de�ZG dd� 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 @ s e Zd ZdZdZdd� ZdS )�Compounda
Flatten all compound paragraphs. For example, transform ::
<compound>
<paragraph>
<literal_block>
<paragraph>
into ::
<paragraph>
<literal_block classes="continued">
<paragraph classes="continued">
i� c C s\ | j �tj�D ]H}d}|D ](}|r4t|tj�sBd}q|d �d� q|�|d d � � qd S )NTF�classes� continued)�document�findallr �compound�
isinstanceZ Invisible�append�replace_self)�selfr Zfirst_child�child� r �B/usr/lib/python3.9/site-packages/docutils/transforms/writer_aux.py�apply( s zCompound.applyN��__name__�
__module__�__qualname__�__doc__Zdefault_priorityr r r r r r s r c @ s e Zd ZdZdZdd� 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� c C s� t �| jjj| jj�}| j�tj�D ]l}|j j
}|d �|� t|tj
�s$tj
|jg|j�R i |j��}t�d|j| �}|�d|� |�|� q$d S )Nr � r )r Zget_languager ZsettingsZ
language_codeZreporterr
r Z
Admonition� __class__r r
r �
admonitionZ rawsourceZchildrenZ
attributes�title�labels�insertr )r �languageZnodeZ node_namer r r r r r K s ��zAdmonitions.applyNr r r r r r 5 s r N)
r Z
__docformat__Zdocutilsr r r Zdocutils.transformsr r r r r r r �<module> s