Website : rimsha.abasa.com
backdoor
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
lib
/
python3
/
dist-packages
/
docutils
/
transforms
/
__pycache__
/
Filename :
parts.cpython-310.pyc
back
Copy
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<