← Back
Editing: __init__.cpython-311.pyc
� N=&b� � �| � d Z dZddlmZ ddlmZmZmZ ddlm Z G d� de� � Z G d� d e � � Zi Zd � Z dS )z0 This package contains Docutils Reader modules. �reStructuredText� )� import_module)�utils�parsers� Component)� universalc �@ � e Zd ZdZdZdZd� Zdd�Zd� Zd� Z d � Z d � ZdS )�Readera9 Abstract base class for docutils Readers. Each reader module or package must export a subclass also called 'Reader'. The two steps of a Reader's responsibility are to read data from the source Input object and parse the data with the Parser object. Call `read()` to process a document. �reader�readersc �r � t j | � � t j t j t j gz S �N)r �get_transformsr �Decorations�ExposeInternals� StripComments��selfs �;/usr/lib/python3/dist-packages/docutils/readers/__init__.pyr zReader.get_transforms s3 � ��'��-�-��1F�1:�1J�1:�1H�1J� J� J� Nc �f � || _ |�|r| � |� � d| _ d| _ dS )z� Initialize the Reader instance. Several instance attributes are defined with dummy initial values. Subclasses may use these attributes as they wish. N)�parser� set_parser�source�input)r r �parser_names r �__init__zReader.__init__% sI � � ��� E� �>�k�>��O�O�K�(�(�(����<��� � $� $r c �L � t j |� � } |� � | _ dS )zSet `self.parser` by name.N)r �get_parser_classr )r r �parser_classs r r zReader.set_parser; s# � ��/��<�<��"�l�n�n����r c � � || _ | j s|| _ || _ | j � � � | _ | � � � | j S r )r r �settings�readr �parse�document)r r r r"