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 :
__init__.cpython-310.pyc
back
Copy
o �?�]h � @ sP d Z dZddlmZmZmZ G dd� de�ZG dd� de�ZG dd � d e�Z d S )a� This package contains modules for standard tree transforms available to Docutils components. Tree transforms serve a variety of purposes: - To tie up certain syntax-specific "loose ends" that remain after the initial parsing of the input plaintext. These transforms are used to supplement a limited syntax. - To automate the internal linking of the document tree (hyperlink references, footnote references, etc.). - To extract useful information from the document tree. These transforms may be used to construct (for example) indexes and tables of contents. Each transform is an optional step that a Docutils component may choose to perform on the parsed document. �reStructuredText� )� languages�ApplicationError� TransformSpecc @ s e Zd ZdS )�TransformErrorN)�__name__� __module__�__qualname__� r r �>/usr/lib/python3/dist-packages/docutils/transforms/__init__.pyr s r c @ s( e Zd ZdZdZ ddd�Zdd� ZdS )� Transformz; Docutils transform component abstract base class. Nc C s( || _ || _ t�|jj|j�| _dS )zA Initial setup for in-place document transforms. N)�document� startnoder �get_language�settings� language_code�reporter�language)�selfr r r r r �__init__* s �zTransform.__init__c K s t d��)z5Override to apply the transform to the document tree.z"subclass must override this method)�NotImplementedError)r �kwargsr r r �apply; s zTransform.apply�N)r r r �__doc__�default_priorityr r r r r r r ! s r c @ sL e Zd ZdZdd� Zddd�Zdd� Zdd d �Zdd� Zd d� Z dd� Z dS )�Transformerz� Stores transforms (`Transform` classes) and applies them to document trees. Also keeps track of components by component type name. c C s: g | _ g | _ || _ g | _ d| _ i | _ d| _d S )Nr )� transforms�unknown_reference_resolversr �applied�sorted� components�serialno)r r r r r r G s zTransformer.__init__Nc K s6 |du r|j }| �|�}| j�||d|f� d| _dS )a+ Store a single transform. Use `priority` to override the default. `kwargs` is a dictionary whose contents are passed as keyword arguments to the `apply` method of the transform. This can be used to pass application-specific data to the transform instance. Nr )r �get_priority_stringr �appendr )r �transform_class�priorityr �priority_stringr r r � add_transforma s � zTransformer.add_transformc C s4 |D ]}| � |j�}| j�||di f� qd| _dS )z3Store multiple transforms, with default priorities.Nr )r# r r r$ r )r �transform_listr% r'