File: //usr/lib/python3/dist-packages/docutils/parsers/rst/directives/__pycache__/parts.cpython-310.pyc
o
Uw#[� � @ s� d Z dZddlmZmZ ddlmZ ddlmZ ddlm Z G dd� de�Z
G d d
� d
e�ZG dd� de�ZG d
d� de�Z
dS )z
Directives for document parts.
�reStructuredText� )�nodes� languages)�parts)� Directive)�
directivesc @ s@ e Zd ZdZdZdd� ZdZdZej ej
eejd�Zdd � Z
d
S )�Contentsa�
Table of contents.
The table of contents is generated in two passes: initial parse and
transform. During the initial parse, a 'pending' element is generated
which acts as a placeholder, storing the TOC title and any options
internally. At a later stage in the processing, the 'pending' element is
replaced by a 'topic' element, a title and the table of contents proper.
)�top�entry�nonec C s t �| tj�}|dkr
d S |S )Nr )r �choicer �backlinks_values)�arg�value� r �G/usr/lib/python3/dist-packages/docutils/parsers/rst/directives/parts.py� backlinks s zContents.backlinks� T)�depth�localr �classc
C s� | j jst| j jtj�s| �d| j ��| j j}t �
|jj|j
�}| jr>| jd }| j�|| j�\}}tj|dg|�R � }ng }d| jv rHd }n t�d|jd �}tjdgd�}|d | j�dg �7 <