B
    ü‹dG  ã               @   s.   d Z ddlmZmZmZ G dd„ dejƒZdS )z#Reader for existing document trees.é    )ÚreadersÚutilsÚ
transformsc               @   s$   e Zd ZdZdZdZdZdd„ ZdS )ÚReadera  
    Adapt the Reader API for an existing document tree.

    The existing document tree must be passed as the ``source`` parameter to
    the `docutils.core.Publisher` initializer, wrapped in a
    `docutils.io.DocTreeInput` object::

        pub = docutils.core.Publisher(
            ..., source=docutils.io.DocTreeInput(document), ...)

    The original document settings are overridden; if you want to use the
    settings of the original document, pass ``settings=document.settings`` to
    the Publisher call above.
    )Zdoctreezdoctree reader)r   c             C   sD   | j | _t | j¡| j_| j| j_t | j dd¡| jj¡| j_	dS )zp
        No parsing to do; refurbish the document tree instead.
        Overrides the inherited method.
        ÚsourceÚ N)
ÚinputZdocumentr   ZTransformerZtransformerÚsettingsr   Znew_reporterÚgetÚreporter)Úself© r   úe/work/yifan.wang/ringdown/master-ringdown-env/lib/python3.7/site-packages/docutils/readers/doctree.pyÚparse    s
    
zReader.parseN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	supportedZconfig_sectionZconfig_section_dependenciesr   r   r   r   r   r   
   s
   r   N)r   Zdocutilsr   r   r   ZReReaderr   r   r   r   r   Ú<module>   s   