| Server IP : 3.111.61.48 / Your IP : 216.73.216.67 Web Server : Apache System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64 User : ubuntu ( 1000) PHP Version : 8.2.31 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/docutils/transforms/__pycache__/ |
Upload File : |
o
�w#[ � @ sX d Z dZddlmZ ddlmZmZ G dd� de�ZG dd� de�ZG d d
� d
e�Z dS )z
Miscellaneous transforms.
�reStructuredText� )�nodes)� Transform�TransformErrorc @ � e Zd ZdZdZdd� 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 C s$ | j }|jd |� |j�|� d S )N�callback)� startnode�details�parent�remove)�self�pending� r �:/usr/lib/python3/dist-packages/docutils/transforms/misc.py�apply s zCallBack.applyN��__name__�
__module__�__qualname__�__doc__�default_priorityr r r r r r s
r c @ r )�ClassAttributez|
Move the "class" attribute specified in the "pending" node into the
immediately following non-comment element.
�� c C s� | j }|j}|}|rDt|�|�d t|��D ]&}|| }t|tj�s(t|tj�r)q|d |j d 7 <