o
    @x#[G  ã                   @   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ÚgetZreporter)Úself© r   ú<usr/lib/python3.10/site-packages/docutils/readers/doctree.pyÚparse    s   
ÿzReader.parseN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Z	supportedZconfig_sectionZconfig_section_dependenciesr   r   r   r   r   r   
   s    r   N)r   Údocutilsr   r   r   ZReReaderr   r   r   r   r   Ú<module>   s   