| Server IP : 167.99.254.82 / Your IP : 216.73.216.229 Web Server : Apache System : Linux host.techisquad.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : pawluxera ( 1011) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/docutils/transforms/__pycache__/ |
Upload File : |
o
"5p` � @ sn d Z dZddlZddlZddlmZmZ ddlmZm Z G dd� de �Z
G dd � d e �ZG d
d� dej�Z
dS )z'
Transforms related to document parts.
�reStructuredText� N)�nodes�utils)�TransformError� Transformc @ s( e Zd ZdZdZ dd� Zd
dd�Zd S )�SectNumaS
Automatically assigns numbers to the titles of document sections.
It is possible to limit the maximum section level for which the numbers
are added. For those sections that are auto-numbered, the "autonum"
attribute is set, informing the contents table generator that a different
form of the TOC should be used.
i� c C s� | j j�dd �| _| j j�dd�| _| j j�dd�| _| j j�dd�| _| j j�| j � | j j
jrB| jd u r:tj
| _| �| j � d S | j| j j
_| j| j j
_| j| j j
_| j| j j
_d S )N�depth�start� �prefix� �suffix)� startnode�details�get�maxdepth�
startvaluer r
�parent�remove�document�settings�
sectnum_xform�sys�maxsize�update_section_numbers�
sectnum_depth�
sectnum_start�sectnum_prefix�sectnum_suffix��self� r! �;/usr/lib/python3/dist-packages/docutils/transforms/parts.py�apply s
z
SectNum.applyr! r c C s� |d7 }|r d}n| j }|D ]A}t|tj�rO|t|�f }|d }tjd| jd�|� | j d dgd�}|� d|� d|d<