| 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�s � � � d Z ddlmZ ddlmZ ddlZddlmc mZ ddl m
Z
n# e$ r ddlZ
Y nw xY wd� Z
dZd Zd
ZdZdZd
ZdZdZdZdZdZdZdZedz ZdZeZeZdZdZ dZ!dZ"dZ#dZ$d� Z% G d� d edg d �� � � � Z& G d!� d"� � Z' G d#� d$e'� � Z( G d%� d&e'� � Z) G d'� d(e(� � Z* G d)� d*e(� � Z+ G d+� d,e'� � Z, G d-� d.e(� � Z- G d/� d0e,� � Z. G d1� d2e-� � Z/ G d3� d4e(� � Z0 G d5� d6e,� � Z1 G d7� d8e-� � Z2 G d9� d:e(� � Z3 G d;� d<e(� � Z4 G d=� d>e4� � Z5 G d?� d@e(� � Z6 G dA� dBe6� � Z7 G dC� dDe6� � Z8 G dE� dFe8� � Z9 G dG� dHe8� � Z: G dI� dJe:� � Z; G dK� dLe(� � Z< G dM� dNe(� � Z=dS )Oa]
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).
INLINE PATTERNS
=============================================================================
Inline patterns such as *emphasis* are handled by means of auxiliary
objects, one per pattern. Pattern objects must be instances of classes
that extend markdown.Pattern. Each pattern object uses a single regular
expression and needs support the following methods:
pattern.getCompiledRegExp() # returns a regular expression
pattern.handleMatch(m) # takes a match object and returns
# an ElementTree element or just plain text
All of python markdown's built-in patterns subclass from Pattern,
but you can add additional patterns that don't.
Also note that all the regular expressions used by inline must
capture the whole block. For this reason, they all start with
'^(.*)' and end with '(.*)!'. In case with built-in expression
Pattern takes care of adding the "^(.*)" and "(.*)!".
Finally, the order in which regular expressions are applied is very
important - e.g. if we first replace http://.../ links with <a> tags
and _then_ try to replace inline html, we would end up with a mess.
So, we apply the expressions in the following order:
* escape and backticks have to go before everything else, so
that we can preempt any markdown patterns by escaping them.
* then we handle auto-links (must be done before inline html)
* then we handle inline HTML. At this point we will simply
replace all inline HTML strings with a placeholder and add
the actual HTML to a hash.
* then inline images (must be done before links)
* then bracketed links, first regular then reference-style
* finally we apply strong and emphasis
� )�util� )�
namedtupleN)�entitiesc �P � t j � � }|� t t � � dd� � |� t t | � � dd� � |� t t | � � dd� � |� t t | � � dd� � |� t t | � � d d
� � |� t t | � � dd� � |� t t | � � d
d� � |� t! t | � � dd� � |� t# t$ | � � dd� � |� t'