Dashboard
PHP:
8.2.30
OS:
Linux
User:
dh_nv8b2m
/
/
usr
/
lib
/
python3
/
dist-packages
/
docutils
/
transforms
/
__pycache__
📤 Upload
📝 New File
📁 New Folder
Close
Editing: components.cpython-310.pyc
o �-$`3 � @ sl d Z dZddlZddlZddlZddlZddlmZmZ ddlm Z m Z ddlmZm Z G dd� de�ZdS ) z( Docutils component-related transforms. �reStructuredText� N)�nodes�utils)�ApplicationError� DataError)� Transform�TransformErrorc @ s e Zd ZdZdZdd� ZdS )�Filterab Include or exclude elements which depend on a specific Docutils component. For use with `nodes.pending` elements. A "pending" element's dictionary attribute ``details`` must contain the keys "component" and "format". The value of ``details['component']`` must match the type name of the component the elements depend on (e.g. "writer"). The value of ``details['format']`` is the name of a specific format or context of that component (e.g. "html"). If the matching Docutils component supports that format or context, the "pending" element is replaced by the contents of ``details['nodes']`` (a list of nodes); otherwise, the "pending" element is removed. For example, the reStructuredText "meta" directive creates a "pending" element containing a "meta" element (in ``pending.details['nodes']``). Only writers (``pending.details['component'] == 'writer'``) supporting the "html", latex, or "odf" formats (``pending.details['format'] == 'html,latex,odf'``) will include the "meta" element; it will be deleted from the output of all other writers. i c C sh | j }|jd }|jd �d�}| jjj| }|D ]}|�|�r+|�|jd � d S q|j� |� d S )N� component�format�,r ) � startnode�details�split�document�transformer� components�supports�replace_self�parent�remove)�self�pending�component_type�formatsr r � r �@/usr/lib/python3/dist-packages/docutils/transforms/components.py�apply- s �zFilter.applyN)�__name__� __module__�__qualname__�__doc__�default_priorityr r r r r r s r )r! � __docformat__�sys�os�re�time�docutilsr r r r �docutils.transformsr r r r r r r �<module> s
Save
Cancel