%PDF- %PDF-
| Direktori : /usr/lib/python3/dist-packages/markdown/__pycache__/ |
| Current File : //usr/lib/python3/dist-packages/markdown/__pycache__/postprocessors.cpython-312.pyc |
�
���e� � �� � d Z ddlmZ ddlmZ ddlmZmZ ddlm Z ddl
Z
erddlmZ dd �Z
G d
� de j � Z G d� d
e� Z G d� de� Z e j$ d� G d� de� � Zy)a5
Post-processors run on the text of the entire document after is has been serialized into a string.
Postprocessors should be used to work with the text just before output. Usually, they are used add
back sections that were extracted in a preprocessor, fix up outgoing encodings, or wrap the whole
document.
� )�annotations)�OrderedDict)�
TYPE_CHECKING�Any� )�utilN)�Markdownc � � t j � }|j t | � dd� |j t � dd� |S )z0 Build the default postprocessors for Markdown. �raw_html� �amp_substitute� )r �Registry�register�RawHtmlPostprocessor�AndSubstitutePostprocessor)�md�kwargs�postprocessorss �9/usr/lib/python3/dist-packages/markdown/postprocessors.py�build_postprocessorsr ( sB � ��]�]�_�N����0��4�j�"�E����6�8�:J�B�O��� c � � e Zd ZdZdd�Zy)�
Postprocessora
Postprocessors are run after the ElementTree it converted back into text.
Each Postprocessor implements a `run` method that takes a pointer to a
text string, modifies it as necessary and returns a text string.
Postprocessors must extend `Postprocessor`.
c � � y)z�
Subclasses of `Postprocessor` should implement a `run` method, which
takes the html document as a single text string and returns a
(possibly modified) string.
N� ��self�texts r �runzPostprocessor.run; s � �
r N�r �str�returnr"