U C^1 @sLdZdZddlmZmZmZddlmZGdddeZGdddeZ d S) 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 ZreStructuredText)nodesutils languages) Transformc@seZdZdZdZddZdS)Compounda Flatten all compound paragraphs. For example, transform :: into :: icCs\|jtjD]H}d}|D](}|r4t|tjsBd}q|ddq||ddqdS)NTFclasses continued)documenttraversercompound isinstanceZ Invisibleappend replace_self)selfr Z first_childchildrD/tmp/pip-install-6_kvzl1k/docutils/docutils/transforms/writer_aux.pyapply(s zCompound.applyN__name__ __module__ __qualname____doc__Zdefault_priorityrrrrrrsrc@seZdZdZdZddZdS) AdmonitionsaZ Transform specific admonitions, like this: Note contents ... into generic admonitions, like this:: Note <paragraph> Note contents ... The admonition title is localized. i��c�����������������C���s���t�|�jjj|�jj}|�jtjD�]f}|j j }|d� |�t |tj s$tj |jf|j|j}td|j|�}|d|�||�q$d�S�)Nr����r���)r���Z get_languager ���settingsZ language_codeZreporterr ���r���Z Admonition __class__r���r ���r ��� admonitionZ rawsourcechildren attributestitlelabelsinsertr���)r���languagenodeZ node_namer���r ���r���r���r���r���K���s����   zAdmonitions.applyNr���r���r���r���r���r���5���s���r���N) r���Z __docformat__Zdocutilsr���r���r���Zdocutils.transformsr���r���r���r���r���r���r���<module>���s ���