+
    Z‹i�  ã                  óø   € R t ^ RIHt ^ RIHtHt ^RIHt ^ RIt]'       d   ^ RI	H
t
 R R lt ! R R	]P                  4      t ! R
 R]4      t ! R R]4      t]P                   ! R4       ! R R]4      4       tR# )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)ÚTYPE_CHECKINGÚAny)ÚutilN)ÚMarkdownc               ó$   € V ^8„  d   QhRRRRRR/# )é   Úmdr   Úkwargsr   Úreturnzutil.Registry[Postprocessor]© )Úformats   "Ú9/usr/lib/python3/dist-packages/markdown/postprocessors.pyÚ__annotate__r   '   s"   € ÷ ñ ˜Xð °ð Ð9Uñ ó    c                óž   € \         P                  ! 4       pVP                  \        V 4      R^4       VP                  \	        4       R^4       V# )z/Build the default postprocessors for Markdown. Úraw_htmlÚamp_substitute)r   ÚRegistryÚregisterÚRawHtmlPostprocessorÚAndSubstitutePostprocessor)r	   r
   Úpostprocessorss   &, r   Úbuild_postprocessorsr   '   sB   € ä—]’]“_€NØ×ÑÔ0°Ó4°jÀ"ÔEØ×ÑÔ6Ó8Ð:JÈBÔOØÐr   c                  ó&   € ] tR t^/tRtR R ltRtR# )Ú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               ó    € V ^8„  d   QhRRRR/# ©r   ÚtextÚstrr   r   )r   s   "r   r   ÚPostprocessor.__annotate__:   s   € ÷ ñ ˜ð  ñ r   c                ó   € R# )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.

Nr   ©Úselfr   s   &&r   ÚrunÚPostprocessor.run:   s   € ñ 	r   r   N©Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r$   Ú__static_attributes__r   r   r   r   r   /   s   † ñ÷ñ r   r   c                  ób   € ] tR t^DtRt]P                  ! R4      tR R ltR R lt	R R lt
R	tR
# )r   z"Restore raw html to the document. z^\<\/?([^ >]+)c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   Ú!RawHtmlPostprocessor.__annotate__I   s   € ÷ ñ ˜ð  ñ r   c                óø   a aa€ R VV V3R lloS P                   P                  P                  '       dF   \        P                  R,          p\
        P                  ! RV RV 24      oSP                  SV4      # V# )z*Iterate over html stash and restore html. c               ó    € V ^8„  d   QhRRRR/# ©r   Úmzre.Match[str]r   r   r   )r   s   "r   r   Ú.RawHtmlPostprocessor.run.<locals>.__annotate__K   s   € ÷ 	Cñ 	C ð 	C°#ñ 	Cr   c                óÞ  <€ V P                  ^4      ;p'       d   RpMV P                  ^4      pRp\        V4      ;pSP                  P                  P                  8¼  d   V P                  ^ 4      # SP                  SP                  P                  P                  V,          4      pV'       d   SP                  V4      '       d   SP                  SV4      # SP                  SRV R24      # )é   TFú<p>z</p>)	ÚgroupÚintr	   Ú	htmlStashÚhtml_counterÚstash_to_stringÚrawHtmlBlocksÚisblocklevelÚsub)r3   ÚkeyÚwrappedÚhtmlÚpatternr#   Úsubstitute_matchs   &   €€€r   rD   Ú2RawHtmlPostprocessor.run.<locals>.substitute_matchK   sÀ   ø€ Ø—g‘g˜a“jÐ ˆsÖ Ø‘à—g‘g˜a“j�Ø�Ü˜3“x�� D§G¡G×$5Ñ$5×$BÑ$BÔBØ—w‘w˜q“zÐ!Ø×'Ñ'¨¯©×(9Ñ(9×(GÑ(GÈÕ(LÓMˆDß˜d×/Ñ/°×5Ò5Ø—{‘{Ð#3°TÓ:Ð:Ø—;‘;Ð/°3°t°f¸DÐ1AÓBÐBr   z([0-9]+)r7   z</p>|)r	   r:   r;   r   ÚHTML_PLACEHOLDERÚreÚcompiler?   )r#   r   Úbase_placeholderrC   rD   s   f& @@r   r$   ÚRawHtmlPostprocessor.runI   sn   ú€ ÷	Cò 	Cð �7‰7×Ñ×)×)Ð)Ü#×4Ñ4°{ÕBÐÜ—j’j 3Ð(8Ð&:¸%ÐAQÐ?SÐ!TÓUˆGØ—;‘;Ð/°Ó6Ð6àˆKr   c               ó    € V ^8„  d   QhRRRR/# )r   rB   r   r   Úboolr   )r   s   "r   r   r/   _   s   € ÷ ñ  ð ¨ñ r   c                óÞ   € V P                   P                  V4      pV'       dJ   VP                  ^4      ^ ,          R9   d   R# V P                  P	                  VP                  ^4      4      # R# )z'Check is block of HTML is block-level. TF)Ú!Ú?Ú@Ú%)ÚBLOCK_LEVEL_REGEXÚmatchr8   r	   Úis_block_level)r#   rB   r3   s   && r   r>   Ú!RawHtmlPostprocessor.isblocklevel_   sS   € à×"Ñ"×(Ñ(¨Ó.ˆßØ�w‰w�q‹z˜!�}Ð 4Ô4áØ—7‘7×)Ñ)¨!¯'©'°!«*Ó5Ð5Ùr   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   r/   i   s   € ÷ ñ  Cð ¨Cñ r   c                ó   € \        V4      # )z&Convert a stashed object to a string. )r   r"   s   &&r   r<   Ú$RawHtmlPostprocessor.stash_to_stringi   s   € ä�4‹yÐr   r   N)r'   r(   r)   r*   r+   rG   rH   rR   r$   r>   r<   r,   r   r   r   r   r   D   s)   † Ù-àŸ
š
Ð#4Ó5Ðõõ,÷ñ r   r   c                  ó&   € ] tR t^ntRtR R ltRtR# )r   zRestore valid entities c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   Ú'AndSubstitutePostprocessor.__annotate__q   s   € ÷ ñ ˜ð  ñ r   c                	óF   € VP                  \        P                  R 4      pV# )Ú&)Úreplacer   ÚAMP_SUBSTITUTEr"   s   &&r   r$   ÚAndSubstitutePostprocessor.runq   s   € Ø�|‰|œD×/Ñ/°Ó5ˆØˆr   r   Nr&   r   r   r   r   r   n   s   † Ù"÷ñ r   r   z‘This class is deprecated and will be removed in the future; use [`UnescapeTreeprocessor`][markdown.treeprocessors.UnescapeTreeprocessor] instead.c                  óž   € ] tR t^vtRt]P                  ! RP                  ]P                  ]P                  4      4      tR R ltR R ltRtR# )	ÚUnescapePostprocessorzRestore escaped chars. z	{}(\d+){}c               ó    € V ^8„  d   QhRRRR/# r2   r   )r   s   "r   r   Ú"UnescapePostprocessor.__annotate__   s   € ÷ $ñ $˜-ð $¨Cñ $r   c                	óH   € \        \        VP                  ^4      4      4      # )r6   )Úchrr9   r8   )r#   r3   s   &&r   ÚunescapeÚUnescapePostprocessor.unescape   s   € Ü”3�q—w‘w˜q“z“?Ó#Ð#r   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   rd   ‚   s   € ÷ 0ñ 0˜ð 0 ñ 0r   c                	óN   € V P                   P                  V P                  V4      # )N)ÚREr?   rg   r"   s   &&r   r$   ÚUnescapePostprocessor.run‚   s   € Ø�w‰w�{‰{˜4Ÿ=™=¨$Ó/Ð/r   r   N)r'   r(   r)   r*   r+   rG   rH   r   r   ÚSTXÚETXrk   rg   r$   r,   r   r   r   rb   rb   v   s9   † ñ
 #à	�Š�L×'Ñ'¨¯©°$·(±(Ó;Ó	<€Bõ$÷0ñ 0r   rb   )r+   Ú
__future__r   Útypingr   r   Ú r   rG   Úmarkdownr   r   Ú	Processorr   r   r   Ú
deprecatedrb   r   r   r   Ú<module>ru      sv   ðñ(õ #ç %Ý Û 	çÝ!õô�D—N‘Nô ô*'˜=ô 'ôT ô ð ‡‚ð\óô	0˜Mó 	0ó	ò	0r   