o
    ZNYb                     @   sZ   d Z dZddlmZ ddlmZmZ G dd deZddddddd	d
ddd
Zdd Z	dS )z0
This package contains Docutils parser modules.
ZreStructuredText    )import_module)	Componentfrontendc                   @   s   e Zd Zddddgdddejdfd	d
gddifddgdddejdfddgddifddgdddejdfffZdZdZdd Z	dd Z
dd ZdS ) ParserzGeneric Parser OptionsNzjDisable directives that insert the contents of an external file; replaced with a "warning" system message.z--no-file-insertionstore_false   file_insertion_enabled)actiondefaultdest	validatorzIEnable directives that insert the contents of an external file. (default)z--file-insertion-enabledr	   
store_truezFDisable the "raw" directive; replaced with a "warning" system message.z--no-rawraw_enabledz%Enable the "raw" directive. (default)z--raw-enabledz>Maximal number of characters in an input line. Default 10 000.z--line-length-limitz<length>int'  )metavartyper
   r   parserparsersc                 C   s   t d)z>Override to parse `inputstring` into document tree `document`.z"subclass must override this method)NotImplementedErrorselfinputstringdocument r   =usr/lib/python3.10/site-packages/docutils/parsers/__init__.pyparse/   s   zParser.parsec                 C   sH   || _ |jdd |jdd |jdd || _|j|j dS )z6Initial parse setup.  Call at start of `self.parse()`.r   Fr   Zline_length_limitr   N)r   settings
setdefaultr   reporterZattach_observernote_parse_messager   r   r   r   setup_parse3   s   zParser.setup_parsec                 C   s   | j j| j j dS )z7Finalize parse details.  Call at end of `self.parse()`.N)r   r   Zdetach_observerr    )r   r   r   r   finish_parse=   s   zParser.finish_parse)__name__
__module____qualname__r   Zvalidate_booleanZvalidate_nonnegative_intZsettings_specZcomponent_typeZconfig_sectionr   r!   r"   r   r   r   r   r      sJ    
r   zdocutils.parsers.nullzdocutils.parsers.rstz%docutils.parsers.recommonmark_wrapperzmyst_parser.docutils_z#docutils.parsers.commonmark_wrapper)
nullZrstZrestructuredtextrestZrestxZrtxtZrecommonmarkZmystZ
commonmarkZmarkdownc              
   C   sN   |   }ztt||}W |jS  ty& } z
td|  d| d}~ww )z6Return the Parser class from the `parser_name` module.zParser "z" not found. N)lowerr   _parser_aliasesgetImportErrorr   )Zparser_namenamemoduleerrr   r   r   get_parser_classU   s   r/   N)
__doc__Z__docformat__	importlibr   docutilsr   r   r   r)   r/   r   r   r   r   <module>   s"   4