IVFz2 6 d Z ddlmZ dZ G d de ZdS )z(
Docutils component-related transforms.
) TransformreStructuredTextc e Zd ZdZdZd ZdS )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 J | j }|j d }|j d d }| j j j | }|D ]:}| | r#| |j d d S ;|j | d S )N componentformat,nodes)
startnodedetailssplitdocumenttransformer
componentssupportsreplace_selfparentremove)selfpendingcomponent_typeformatsr r s ~/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/components.pyapplyzFilter.apply, s . 5?8,33C88M-8H + +F!!&))
$$W_W%=>>>
N!!'***** N)__name__
__module____qualname____doc__default_priorityr r r r r s5 4
+
+
+
+
+r r N)r docutils.transformsr
__docformat__r r" r r