%PDF- %PDF-
Direktori : /lib/python3/dist-packages/markdown/extensions/__pycache__/ |
Current File : //lib/python3/dist-packages/markdown/extensions/__pycache__/md_in_html.cpython-312.pyc |
� ���e�@ � � � d Z ddlmZ ddlmZ ddlmZ ddlmZ ddl m Z dd lmZ dd lm Z mZ ddlmc mZ ddlmZmZmZ erdd lmZ G d� de � Z G d� de� Z G d� de� Z G d� de � Z G d� de� Zd� Zy)z� An implementation of [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/)'s parsing of Markdown syntax in raw HTML. See the [documentation](https://Python-Markdown.github.io/extensions/raw_html) for details. � )�annotations� )� Extension� )�BlockProcessor)�Preprocessor)�RawHtmlPostprocessor)�util)� HTMLExtractor� blank_line_reN)� TYPE_CHECKING�Literal�Mapping)�Markdownc � � � e Zd ZdZd� fd�Z� fd�Z� fd�Zdd�Zdd�Z� fd�Z � fd�Z d � Z� fd �Z� fd�Z d� fd�Zd� fd �Z� xZS )�HTMLExtractorExtraz� Override `HTMLExtractor` and create `etree` `Elements` for any elements which should have content parsed as Markdown. c � �� t |j j � � | _ t g d�� | _ t g d�� | _ t �| � |g|��i |�� t | j � | j | j z | j z z | _ | j | j z | _ y )N)�address�dd�dt�h1�h2�h3�h4�h5�h6�legend�li�p�summary�td�th)�canvas�math�option�pre�script�style�textarea)�set�block_level_elements�copy�block_level_tags� span_tags�raw_tags�super�__init__� empty_tags� block_tags�span_and_blocks_tags)�self�md�args�kwargs� __class__s ��@/usr/lib/python3/dist-packages/markdown/extensions/md_in_html.pyr1 zHTMLExtractorExtra.__init__+ s� �� � #�B�$;�$;�$@�$@�$B� C����s� ��� �^�_�� � ����-�d�-�f�-� �d�3�3�4�������8V�Y]�Yh�Yh�8h�i���$(�O�O�d�n�n�$D��!� c �p �� g | _ t j � | _ g | _ t �| � � y)z1Reset this instance. Loses all unprocessed data.N)�mdstack�etree�TreeBuilder�treebuilder�mdstater0 �reset�r5 r9 s �r: rB zHTMLExtractorExtra.reset; s+ �� �"$��� �,�,�.���DF��� �� �r; c �x �� t �| � � | j r| j | j d � yy)zHandle any buffered data.r N)r0 �closer= � handle_endtagrC s �r: rE zHTMLExtractorExtra.closeB s. �� � �� ���<�<����t�|�|�A��/� r; c �l � | j j � }t j � | _ |S )zJ Return element from `treebuilder` and reset `treebuilder` for later use. )r@ rE r>