| Server IP : 54.37.205.81 / Your IP : 216.73.216.76 Web Server : nginx/1.22.1 System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64 User : debian ( 1000) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/markdown/__pycache__/ |
Upload File : |
�
Ӽ�b�
� � � d Z ddlmZ ddlmZ ddlZd� Z G d� dej � � Z G d � d
e� � Z G d� de� � Z
dS )
a�
Python Markdown
A Python implementation of John Gruber's Markdown.
Documentation: https://python-markdown.github.io/
GitHub: https://github.com/Python-Markdown/markdown/
PyPI: https://pypi.org/project/Markdown/
Started by Manfred Stienstra (http://www.dwerg.net/).
Maintained for a few years by Yuri Takhteyev (http://www.freewisdom.org).
Currently maintained by Waylan Limberg (https://github.com/waylan),
Dmitry Shachnev (https://github.com/mitya57) and Isaac Muse (https://github.com/facelessuser).
Copyright 2007-2018 The Python Markdown Project (v. 1.7 and later)
Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b)
Copyright 2004 Manfred Stienstra (the original version)
License: BSD (see LICENSE.md for details).
PRE-PROCESSORS
=============================================================================
Preprocessors work on source text before we start doing anything too
complicated.
� )�util)�
HTMLExtractor� Nc � � t j � � }|� t | � � dd� � |� t | � � dd� � |S )z: Build the default set of preprocessors used by Markdown. �normalize_whitespace� �
html_block� )r �Registry�register�NormalizeWhitespace�HtmlBlockPreprocessor)�md�kwargs�
preprocessorss �8/usr/lib/python3/dist-packages/markdown/preprocessors.py�build_preprocessorsr ! sV � ��M�O�O�M����.�r�2�2�4J�B�O�O�O����0��4�4�l�B�G�G�G��� c � � e Zd ZdZd� ZdS )�PreprocessoraF
Preprocessors are run after the text is broken into lines.
Each preprocessor implements a "run" method that takes a pointer to a
list of lines of the document, modifies it as necessary and returns
either the same pointer or a pointer to a new list.
Preprocessors must extend markdown.Preprocessor.
c � � dS )z�
Each subclass of Preprocessor should override the `run` method, which
takes the document as a list of strings split by newlines and returns
the (possibly modified) list of lines.
N� )�self�liness r �runzPreprocessor.run4 s � �
�r N��__name__�
__module__�__qualname__�__doc__r r r r r r ) s- � � � � � � � �
�
�
�
�
r r c � � e Zd ZdZd� ZdS )r
z. Normalize whitespace for consistent parsing. c � � d� |� � }|� t j d� � � t j d� � }|� dd� � � dd� � dz }|� | j j � � }t j dd|� � }|�
d� � S )N�
� z
�
z
z(?<=\n) +\n)�join�replacer �STX�ETX�
expandtabsr �
tab_length�re�sub�split)r r �sources r r zNormalizeWhitespace.runA s� � ����5�!�!�������"�-�-�5�5�d�h��C�C�������-�-�5�5�d�D�A�A�F�J���"�"�4�7�#5�6�6������f�5�5���|�|�D�!�!�!r Nr r r r r
r
>