← Back
Editing: recommonmark_wrapper.cpython-311.pyc
� �,b� � �� � d Z ddlmZmZ ddlmZ n# e$ rZ ee� d�� � �dZ[ww xY w ddlm Z n# e$ r G d� d� � Z Y nw xY wd � Z G d � de� � ZdS )aj A parser for CommonMark Markdown text using `recommonmark`__. __ https://pypi.org/project/recommonmark/ .. important:: This module is provisional * The "recommonmark" package is unmaintained and deprecated. This wrapper module will be removed in a future Docutils version. * The API is not settled and may change with any minor Docutils version. � )�nodes� Component)�CommonMarkParserz�. Parsing "recommonmark" Markdown flavour requires the package https://pypi.org/project/recommonmark which in turn depends on https://pypi.org/project/sphinx.N)�addnodesc � � e Zd Zej ZdS )r N)�__name__� __module__�__qualname__r �pending�pending_xref� � �G/usr/lib/python3/dist-packages/docutils/parsers/recommonmark_wrapper.pyr r * s � � � � � ��}���r r c �N � t | t j t j f� � S �N)� isinstancer �literal� literal_block)�nodes r � is_literalr / s � ��d�U�]�E�,?�@�A�A�Ar c �8 � e Zd ZdZdZ dZdZd� Zd� Zd� Z d� Z d S ) �Parserz�MarkDown parser based on recommonmark. This parser is provisional: the API is not settled and may change with any minor Docutils version. )�recommonmark� commonmark�markdown�mdzrecommonmark parser)�parsersc �* � t j | � � S r )r �get_transforms)�selfs r r zParser.get_transforms? s � ��'��-�-�-r c �z � t |� d� � � � D ]Z\ }}t |� � |j j k r8|j � d|dz z � � }|� |� � dS �[ t j | ||� � nW# t $ rJ}|j j r|�|j � d|z � � }|� |� � Y d}~nd}~ww xY w|� t j � � D ]�}|j }d}|dz t |� � k r�t! || t j � � rgt! ||dz t j � � rDt j || |� |dz � � z � � ||<