Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Markdown / postprocessors.pyc
Size: Mime:
ó
Âö™Wc@@sÊdZddlmZddlmZddlmZddlmZddlmZddl	Z	d	„Z
d
ejfd„ƒYZdefd
„ƒYZ
defd„ƒYZdefd„ƒYZdS(u
POST-PROCESSORS
=============================================================================

Markdown also allows post-processors, which are similar to preprocessors in
that they need to implement a "run" method. However, they are run after core
processing.

i(tabsolute_import(tunicode_literals(tOrderedDicti(tutil(todictNcK@s:tjƒ}t|ƒ|d<tƒ|d<tƒ|d<|S(u0 Build the default postprocessors for Markdown. uraw_htmluamp_substituteuunescape(RRtRawHtmlPostprocessortAndSubstitutePostprocessortUnescapePostprocessor(tmd_instancetkwargstpostprocessors((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pytbuild_postprocessorss


t
PostprocessorcB@seZdZd„ZRS(u
    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 markdown.Postprocessor.

    cC@sdS(u¿
        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((tselfttext((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pytrun's(t__name__t
__module__t__doc__R(((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyRs	RcB@s)eZdZd„Zd„Zd„ZRS(u# Restore raw html to the document. c	@sdtƒ‰xt|jjjƒD]÷}|jjj|\}}|jjr·|r·t|jjƒjƒdkr|j	|ƒ}q·t|jjƒjƒdkr¨d}q·|jj
}n|j|ƒrý|sÙ|jjrý|dˆd|jjj|ƒ<n|ˆ|jjj|ƒ<qWˆr`t
jdjd„ˆDƒƒƒ}|j‡fd†|ƒ}n|S(	u2 Iterate over html stash and restore "safe" html. uescapeuremoveuu
u	<p>%s</p>u|cs@s|]}tj|ƒVqdS(N(tretescape(t.0tk((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pys	<genexpr>Hsc@sˆ|jdƒS(Ni(tgroup(tm(treplacements(s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyt<lambda>Is(Rtrangetmarkdownt	htmlStashthtml_countert
rawHtmlBlockstsafeModetstrtlowerRthtml_replacement_texttisblockleveltget_placeholderRtcompiletjointsub(R
Rtithtmltsafetpattern((Rs5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyR4s"		$"cC@sF|jddƒ}|jddƒ}|jddƒ}|jddƒS(	u Basic html escaping u&u&amp;u<u&lt;u>u&gt;u"u&quot;(treplace(R
R*((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyRMscC@sOtjd|ƒ}|rK|jdƒddkr5tStj|jdƒƒStS(	Nu^\<\/?([^ >]+)iiu!u?u@u%(u!u?u@u%(RtmatchRtTrueRtisBlockLeveltFalse(R
R*R((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyR$Ts(RRRRRR$(((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyR1s		RcB@seZdZd„ZRS(u Restore valid entities cC@s|jtjdƒ}|S(Nu&(R-RtAMP_SUBSTITUTE(R
R((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyRas(RRRR(((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyR^sRcB@s?eZdZejdejejfƒZd„Z	d„Z
RS(u Restore escaped chars u	%s(\d+)%scC@stjt|jdƒƒƒS(Ni(Rtint2strtintR(R
R((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pytunescapekscC@s|jj|j|ƒS(N(tRER(R5(R
R((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyRns(RRRRR&RtSTXtETXR6R5R(((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyRfs	(Rt
__future__RRtcollectionsRtRRRRt	ProcessorRRRR(((s5build/lib.linux-x86_64-2.7/markdown/postprocessors.pyt<module>	s		-