
    Ki$                    J    d Z ddlmZ dZddlmZmZ ddlmZ  G d de      Z	y)	z
Auxiliary transforms mainly to be used by Writer components.

This module is called "writer_aux" because otherwise there would be
conflicting imports like this one::

    from docutils import writers
    from docutils.transforms import writers
    )annotationsreStructuredText)nodes	languages)	Transformc                      e Zd ZdZdZddZy)AdmonitionsaZ  
    Transform specific admonitions, like this:

        <note>
            <paragraph>
                 Note contents ...

    into generic admonitions, like this::

        <admonition classes="note">
            <title>
                Note
            <paragraph>
                Note contents ...

    The admonition title is localized.
    i  c                t   t        j                  | j                  j                  j                  | j                  j
                        }| j                  j                  t        j                        D ]  }|j                  j                  }|d   j                  |       t        |t        j                        rHt        j                  |j                  g|j                  i |j                   }t        j"                  d|j$                  |         }|j'                  d|       |j)                  |        y )Nclasses r   )r   get_languagedocumentsettingslanguage_codereporterfindallr   
Admonition	__class____name__append
isinstance
admonition	rawsourcechildren
attributestitlelabelsinsertreplace_self)selflanguagenode	node_namer   r   s         j/home/jay/workspace/scripts/.codegraph-venv/lib/python3.12/site-packages/docutils/transforms/writer_aux.pyapplyzAdmonitions.apply,   s    ))$--*@*@*N*N*.--*@*@BMM))%*:*:; 
	.D//IO""9-dE$4$45"--dnn At}} A04A
B	(BC!!!U+!!*-
	.    N)returnNone)r   
__module____qualname____doc__default_priorityr%    r&   r$   r	   r	      s    $ .r&   r	   N)
r+   
__future__r   __docformat__docutilsr   r   docutils.transformsr   r	   r-   r&   r$   <module>r2      s&   
 #" % )#.) #.r&   