HEX
Server: LiteSpeed
System: Linux s1049.use1.mysecurecloudhost.com 4.18.0-477.27.2.lve.el8.x86_64 #1 SMP Wed Oct 11 12:32:56 UTC 2023 x86_64
User: xedaptot (3356)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/docutils/transforms/__pycache__/components.cpython-36.opt-1.pyc
3

:�pD��@sldZdZddlZddlZddlZddlZddlmZmZddlm	Z	m
Z
ddlmZm
Z
Gdd�de�ZdS)	z(
Docutils component-related transforms.
ZreStructuredText�N)�nodes�utils)�ApplicationError�	DataError)�	Transform�TransformErrorc@seZdZdZdZdd�ZdS)�FilteraA
    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" format (``pending.details['format'] == 'html'``) will include the
    "meta" element; it will be deleted from the output of all other writers.
    icCsT|j}|jd}|jd}|jjj|}|j|�rD|j|jd�n|jj|�dS)N�	component�formatr)	Z	startnodeZdetailsZdocumentZtransformerZ
componentsZsupportsZreplace_self�parent�remove)�self�pendingZcomponent_typer
r	�r� /usr/lib/python3.6/components.py�apply,s


zFilter.applyN)�__name__�
__module__�__qualname__�__doc__Zdefault_priorityrrrrrrsr)rZ
__docformat__�sys�os�reZtimeZdocutilsrrrrZdocutils.transformsrrrrrrr�<module>s