
    k7i                    :    S r SSKJr  SrSSKJr   " S S\5      rg)z(
Docutils component-related transforms.
    )annotationsreStructuredText)	Transformc                  &    \ rS rSrSrSrSS jrSrg)Filter   aw  
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                p   U R                   nUR                  S   nUR                  S   R                  S5      nU R                  R                  R
                  U   nU H9  nUR                  U5      (       d  M  UR                  UR                  S   5          g    UR                  R                  U5        g )N	componentformat,nodes)
	startnodedetailssplitdocumenttransformer
componentssupportsreplace_selfparentremove)selfpendingcomponent_typeformatsr
   r   s         X/home/james-whalen/.local/lib/python3.13/site-packages/docutils/transforms/components.pyapplyFilter.apply.   s    .. 5??8,33C8MM--88H	F!!&))$$W__W%=> 
 NN!!'*     N)returnNone)__name__
__module____qualname____firstlineno____doc__default_priorityr   __static_attributes__r    r   r   r   r      s    4 
+r   r   N)r'   
__future__r   __docformat__docutils.transformsr   r   r    r   r   <module>r-      s#   
 #" )(+Y (+r   