HEX
Server: Apache
System: Linux pdx1-shared-a1-29 6.18.39-grsec-noble+ #4 SMP Thu Jul 23 07:53:29 UTC 2026 x86_64
User: dh_bj99yp (22285841)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/docutils/transforms/__pycache__/components.cpython-312.pyc
�

�ddg��.�dZddlmZdZGd�de�Zy)z(
Docutils component-related transforms.
�)�	Transform�reStructuredTextc��eZdZdZdZd�Zy)�Filtera�
    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, up to version 0.17, the reStructuredText "meta"
    directive created 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'``) included the
    "meta" element; it was deleted from the output of all other writers.

    This transform is no longer used by Docutils, it may be removed in future.
    ic�b�|j}|jd}|jdjd�}|jjj
|}|D]3}|j
|�s�|j|jd�y|jj|�y)N�	component�format�,�nodes)
�	startnode�details�split�document�transformer�
components�supports�replace_self�parent�remove)�self�pending�component_type�formatsrr	s      �@/usr/lib/python3/dist-packages/docutils/transforms/components.py�applyzFilter.apply,s����.�.�� ����5���?�?�8�,�3�3�C�8���M�M�-�-�8�8��H�	��	+�F��!�!�&�)��$�$�W�_�_�W�%=�>��	+�

�N�N�!�!�'�*�N)�__name__�
__module__�__qualname__�__doc__�default_priorityr�rrrrs���4��
+rrN)r �docutils.transformsr�
__docformat__rr"rr�<module>r%s ��
�*�"�
�(+�Y�(+r