+
    Z‹iôD  ã                  óø   € R t ^ RIHt ^ RIt^ RIHu Ht ^ RIHtH	t	 ^RI
Ht ^RI
Ht ]'       d   ^ RIHt R R ltR	 R
 lt ! R R]P"                  4      t ! R R]4      t ! R R]4      t ! R R]4      tR# )zê
Tree processors manipulate the tree created by block processors. They can even create an entirely
new `ElementTree` object. This is an excellent place for creating summaries, adding collected
references, or last minute adjustments.

)ÚannotationsN)ÚTYPE_CHECKINGÚAny)Úutil)Úinlinepatterns)ÚMarkdownc               ó$   € V ^8„  d   QhRRRRRR/# )é   Úmdr   Úkwargsr   Úreturnzutil.Registry[Treeprocessor]© )Úformats   "Ú9/usr/lib/python3/dist-packages/markdown/treeprocessors.pyÚ__annotate__r   '   s"   € ÷ ñ ˜Xð °ð Ð9Uñ ó    c                óØ   € \         P                  ! 4       pVP                  \        V 4      R^4       VP                  \	        V 4      R^
4       VP                  \        V 4      R^ 4       V# )z2Build the default  `treeprocessors` for Markdown. ÚinlineÚprettifyÚunescape)r   ÚRegistryÚregisterÚInlineProcessorÚPrettifyTreeprocessorÚUnescapeTreeprocessor)r
   r   Útreeprocessorss   &, r   Úbuild_treeprocessorsr   '   sZ   € ä—]’]“_€NØ×ÑœO¨BÓ/°¸2Ô>Ø×ÑÔ1°"Ó5°zÀ2ÔFØ×ÑÔ1°"Ó5°zÀ1ÔEØÐr   c               ó    € V ^8„  d   QhRRRR/# )r	   ÚsÚobjectr   Úboolr   )r   s   "r   r   r   0   s   € ÷ ñ �ð ˜4ñ r   c                óf   € \        V \        P                  4      '       g   \        V \        4      # R# )z^Return `True` if object is a string but not an  [`AtomicString`][markdown.util.AtomicString]. F)Ú
isinstancer   ÚAtomicStringÚstr)r   s   &r   ÚisStringr%   0   s%   € ä�aœ×*Ñ*×+Ò+Ü˜!œSÓ!Ð!Ùr   c                  ó&   € ] tR t^7tRtR R ltRtR# )ÚTreeprocessorzø
`Treeprocessor`s are run on the `ElementTree` object before serialization.

Each `Treeprocessor` implements a `run` method that takes a pointer to an
`Element` and modifies it as necessary.

`Treeprocessors` must extend `markdown.Treeprocessor`.

c               ó    € V ^8„  d   QhRRRR/# )r	   Úrootúetree.Elementr   úetree.Element | Noner   )r   s   "r   r   ÚTreeprocessor.__annotate__A   s   € ÷ ñ ˜ð Ð*>ñ r   c                ó   € R# )zö
Subclasses of `Treeprocessor` should implement a `run` method, which
takes a root `Element`. This method can return another `Element`
object, and the existing root `Element` will be replaced, or it can
modify the current tree and return `None`.
Nr   )Úselfr)   s   &&r   ÚrunÚTreeprocessor.runA   s   € ñ 	r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r/   Ú__static_attributes__r   r   r   r'   r'   7   s   † ñ÷ñ r   r'   c                  ó¦   € ] tR t^KtRtR R ltR R ltR R ltR R	 ltRR
 R llt	RR R llt
RR R lltRR R lltR R ltRR R lltRtR# )r   zD
A `Treeprocessor` that traverses a tree, applying inline patterns.
c               ó   € V ^8„  d   QhRR/# )r	   r
   r   r   )r   s   "r   r   ÚInlineProcessor.__annotate__P   s   € ÷ 'ñ '˜8ñ 'r   c                	ó6  € \         P                  V n        \         P                  V n        ^\        V P                  4      ,           \        V P                  4      ,           V n        \         P                  V n        Wn	        VP                  V n
        . V n        R# )é   N)r   ÚINLINE_PLACEHOLDER_PREFIXÚ$_InlineProcessor__placeholder_prefixÚETXÚ$_InlineProcessor__placeholder_suffixÚlenÚ$_InlineProcessor__placeholder_lengthÚINLINE_PLACEHOLDER_REÚ _InlineProcessor__placeholder_rer
   ÚinlinePatternsÚ	ancestors)r.   r
   s   &&r   Ú__init__ÚInlineProcessor.__init__P   sp   € Ü$(×$BÑ$BˆÔ!Ü$(§H¡HˆÔ!Ø$%¬¨D×,EÑ,EÓ(FÕ$FÜ(+¨D×,EÑ,EÓ(Fõ%GˆÔ!ä $× :Ñ :ˆÔØŒØ ×/Ñ/ˆÔØ$&ˆŽr   c               ó    € V ^8„  d   QhRRRR/# )r	   Útyper$   r   ztuple[str, str]r   )r   s   "r   r   r9   Z   s   € ÷ ñ  cð ¨oñ r   c                ón   € R\        V P                  4      ,          p\        P                  V,          pW23# )zGenerate a placeholder z%04d)r@   Ústashed_nodesr   ÚINLINE_PLACEHOLDER)r.   rI   ÚidÚhashs   &&  r   Ú__makePlaceholderÚ!InlineProcessor.__makePlaceholderZ   s.   € à”c˜$×,Ñ,Ó-Õ-ˆÜ×&Ñ&¨Õ+ˆØˆxˆr   c               ó$   € V ^8„  d   QhRRRRRR/# )r	   Údatar$   ÚindexÚintr   ztuple[str | None, int]r   )r   s   "r   r   r9   `   s"   € ÷ #ñ # cð #°#ð #Ð:Pñ #r   c                ó    € V P                   P                  W4      pV'       d"   VP                  ^4      VP                  4       3# RV^,           3# )zÉ
Extract id from data string, start from index.

Arguments:
    data: String.
    index: Index, from which we start search.

Returns:
    Placeholder id and string index, after the found placeholder.

N)rC   ÚsearchÚgroupÚend)r.   rR   rS   Úms   &&& r   Ú__findPlaceholderÚ!InlineProcessor.__findPlaceholder`   sD   € ð ×!Ñ!×(Ñ(¨Ó5ˆßØ—7‘7˜1“:˜qŸu™u›wÐ&Ð&à˜ ��?Ð"r   c               ó$   € V ^8„  d   QhRRRRRR/# )r	   Únodezetree.Element | strrI   r$   r   r   )r   s   "r   r   r9   r   s"   € ÷ ñ Ð 3ð ¸3ð À3ñ r   c                óH   € V P                  V4      w  r4WP                  V&   V# )zAdd node to stash. )Ú!_InlineProcessor__makePlaceholderrK   )r.   r]   rI   ÚplaceholderrM   s   &&&  r   Ú__stashNodeÚInlineProcessor.__stashNoder   s(   € à×0Ñ0°Ó6‰ˆØ!%×Ñ˜2ÑØÐr   c               ó$   € V ^8„  d   QhRRRRRR/# )r	   rR   r$   ÚpatternIndexrT   r   r   )r   s   "r   r   r9   x   s!   € ÷ ñ  3ð °cð À#ñ r   c                óø   € \        V\        P                  4      '       gZ   ^ p\        V P                  4      pW$8  d=   V P                  V P                  V,          WV4      w  rpV'       d   K7  V^,          pKB  V# )zá
Process string with inline patterns and replace it with placeholders.

Arguments:
    data: A line of Markdown text.
    patternIndex: The index of the `inlinePattern` to start with.

Returns:
    String with placeholders.

)r"   r   r#   r@   rD   Ú_InlineProcessor__applyPattern)r.   rR   rd   Ú
startIndexÚcountÚmatcheds   &&&   r   Ú__handleInlineÚInlineProcessor.__handleInlinex   so   € ô ˜$¤× 1Ñ 1×2Ò2ØˆJÜ˜×+Ñ+Ó,ˆEØÔ&Ø,0×,?Ñ,?Ø×'Ñ'¨Õ5°tÈ:ó-Ñ)�˜z÷ ‘wØ  AÕ%’LØˆr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )r	   r]   r*   ÚsubnodeÚisTextr    r   ÚNoner   )r   s   "r   r   r9   �   s*   € ÷ *ñ *¨ð *Àð *ÐX\ð *Ðhlñ *r   c                óL  € V'       d   VP                   pRVn         MVP                  pRVn        V P                  WBV4      pV'       g(   WJd#   \        V4      P	                  V4      ^,           pM^ pVP                  4        V F  pVP                  Wg^ ,          4       K  	  R# )zï
Process placeholders in `Element.text` or `Element.tail`
of Elements popped from `self.stashed_nodes`.

Arguments:
    node: Parent node.
    subnode: Processing node.
    isText: Boolean variable, True - it's text, False - it's a tail.

N)ÚtextÚtailÚ%_InlineProcessor__processPlaceholdersÚlistrS   ÚreverseÚinsert)r.   r]   rm   rn   rq   ÚchildResultÚposÚnewChilds   &&&&    r   Ú__processElementTextÚ$InlineProcessor.__processElementText�   s…   € ÷ Ø—<‘<ˆDØˆG�Là—<‘<ˆDØˆGŒLà×0Ñ0°ÀÓGˆç˜$Ó-Ü�t“*×"Ñ" 7Ó+¨aÕ/‰CàˆCà×ÑÔÛ#ˆHØ�K‰K˜ a�[Ö)ó $r   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r	   rR   ú
str | NoneÚparentr*   rn   r    r   z%list[tuple[etree.Element, list[str]]]r   )r   s   "r   r   r9   ¬   s8   € ÷ Oñ OàðOð ðOð ð	Oð
 
/ñOr   c                óî  aaa€ R VVV3R llp. o^ pV'       EdÚ   VP                  V P                  V4      pVR8w  Edo   V P                  W4      w  rxWpP                  9   Ed    V P                  P	                  V4      p	V^ 8”  d   WV p
V! V
4       \        V	\        4      '       g§   V	.\        V	4      ,            FŽ  pVP                  '       d3   VP                  P                  4       '       d   V P                  W›R4       VP                  '       g   K[  VP                  P                  4       '       g   K}  V P                  W»4       K�  	  MV! V	4       TpEKH  TpSP                  W�P                  R,          34       EKp  V\        V P                  4      ,           pV! WV 4       TpEK›  WR p
\        V\        P                   4      '       d   \        P                   ! V
4      p
V! V
4       RpEKâ  S# )ad  
Process string with placeholders and generate `ElementTree` tree.

Arguments:
    data: String with placeholders instead of `ElementTree` elements.
    parent: Element, which contains processing inline data.
    isText: Boolean variable, True - it's text, False - it's a tail.

Returns:
    List with `ElementTree` elements with applied inline patterns.

c               ó    € V ^8„  d   QhRRRR/# )r	   rq   r}   r   ro   r   )r   s   "r   r   Ú;InlineProcessor.__processPlaceholders.<locals>.__annotate__¾   s   € ÷ 	+ñ 	+˜:ð 	+¨$ñ 	+r   c                óÐ  <€ V '       dÝ   S'       da   SR,          ^ ,          P                   '       d*   SR,          ^ ,          ;P                   V ,          un         R# V SR,          ^ ,          n         R# S'       g7   SP                   '       d   S;P                   V ,          un         R# V Sn         R# SP                  '       d   S;P                  V ,          un        R# V Sn        R# R# )é   Néÿÿÿÿ)rr   rq   )rq   rn   r~   Úresults   &€€€r   ÚlinkTextÚ7InlineProcessor.__processPlaceholders.<locals>.linkText¾   sŠ   ø€ ßßØ˜b•z !•}×)×)Ð)Ø˜r�
 1�×*Ò*¨dÕ2×*à-1˜˜r�
 1�Ö*ßØ—{—{�{ØŸš tÕ+Ÿà&*˜žà—{—{�{ØŸš tÕ+Ÿà&*˜žñ r   FºNNNNÚ r„   )Úfindr=   Ú!_InlineProcessor__findPlaceholderrK   Úgetr"   r$   rt   rr   ÚstripÚ$_InlineProcessor__processElementTextrq   ÚappendrE   r@   r   r#   )r.   rR   r~   rn   r†   ÚstrartIndexrS   rM   Ú
phEndIndexr]   rq   ÚchildrX   r…   s   &&ff         @r   Ú__processPlaceholdersÚ%InlineProcessor.__processPlaceholders¬   sœ  ú€ ÷$	+ò 	+ð" ˆØˆßˆdØ—I‘I˜d×7Ñ7¸ÓEˆEØ˜�{Ø!%×!7Ñ!7¸Ó!D‘�à×+Ñ+Õ+Ø×-Ñ-×1Ñ1°"Ó5�Dà˜q”yØ#°Ð6˜Ù  œä% d¬C×0Ò0Ø&* V¬d°4«j×%8Ð%8˜EØ$ŸzŸz˜zØ#(§:¡:×#3Ñ#3×#5Ò#5Ø$(×$=Ñ$=Ø(,°Uô%&ð  %ŸzŸzšzØ#(§:¡:×#3Ñ#3×#5Ô#5Ø$(×$=Ñ$=¸eÖ$Kò &9ñ ! œØ&0˜Ú à",�KØ—M‘M 4¯©¸Õ):Ð";×<ð  ¤# d×&?Ñ&?Ó"@Õ@�CÙ˜T¨cÐ2Ô3Ø"%“Kà˜LÐ)�Ü˜d¤D×$5Ñ$5×6Ò6ä×,Ò,¨TÓ2�DÙ˜”Ø“àˆr   c          
     ó,   € V ^8„  d   QhRRRRRRRRRR	/# )
r	   Úpatternzinlinepatterns.PatternrR   r$   rd   rT   rg   r   ztuple[str, bool, int]r   )r   s   "r   r   r9   ý   sJ   € ÷ NOñ NOà'ðNOð ðNOð ð	NOð
 ðNOð 
ñNOr   c                ó²  € \        V\        P                  4      pVP                   F)  pVP	                  4       V P
                  9   g   K$  VR^ 3u # 	  V'       da   RpVP                  4       P                  W$4       F:  pVP                  Wr4      w  r‰p
V	e   V
f   WGP                  ^ 4      ,          pRpK:   M)	  M&VP                  4       P                  W$R 4      pVRV pV'       g   VR^ 3# V'       g4   VP                  V4      pVP                  ^ 4      p	VP                  ^ 4      p
Xf   VRX
3# \        V\        4      '       Eg   \        VP                  \        P                  4      '       gê   V.\!        V4      ,            FÒ  p\#        V4      '       d   K  VP                  '       dv   V P
                  P%                  VP&                  P	                  4       4       V P)                  VP                  V^,           4      Vn        V P
                  P+                  4        VP,                  '       g   K±  V P)                  VP,                  V4      Vn        KÔ  	  V P/                  W�P1                  4       4      pV'       d   RP3                  VRX	 WÒX
R 4      R^ 3# RP3                  XVP5                  ^4      W×P7                  4       R,          4      R^ 3# )ak  
Check if the line fits the pattern, create the necessary
elements, add it to `stashed_nodes`.

Arguments:
    data: The text to be processed.
    pattern: The pattern to be checked.
    patternIndex: Index of current pattern.
    startIndex: String index, from which we start searching.

Returns:
    String with placeholders instead of `ElementTree` elements.

FNTz{}{}{}z{}{}{}{}r„   )r"   r   r   ÚANCESTOR_EXCLUDESÚlowerrE   ÚgetCompiledRegExpÚfinditerÚhandleMatchrX   ÚmatchÚstartr$   rq   r   r#   rt   r%   r�   ÚtagÚ_InlineProcessor__handleInlineÚpoprr   Ú_InlineProcessor__stashNoderI   r   rW   Úgroups)r.   r–   rR   rd   rg   Ú	new_styleÚexcluder�   r]   rž   rX   ÚleftDatar’   r`   s   &&&&&         r   Ú__applyPatternÚInlineProcessor.__applyPatterný   sh  € ô* ˜w¬×(FÑ(FÓGˆ	à×0Ô0ˆGØ�}‰}‹ $§.¡.Ö0Ø˜U A�~Ò%ñ 1÷ ØˆEð !×2Ñ2Ó4×=Ñ=¸dÖO�Ø#*×#6Ñ#6°uÓ#CÑ �˜SØ’= C¢KØ§)¡)¨A£,Õ.�JØ �EÙÙò Pð ×-Ñ-Ó/×5Ñ5°d¸;Ð6GÓHˆEØ˜K˜ZÐ(ˆHçØ˜ �>Ð!çØ×&Ñ& uÓ-ˆDØ—K‘K “NˆEØ—)‘)˜A“,ˆCàŠ<Ø˜˜s�?Ð"ä˜$¤×$Ó$Ü˜dŸi™i¬×):Ñ):×;Ò;à"˜V¤d¨4£j×0Ð0�EÜ# DŸ>œ>Ø Ÿ:Ÿ:˜:Ø ŸN™N×1Ñ1°%·)±)·/±/Ó2CÔDØ)-×)<Ñ)<Ø %§
¡
¨L¸1Õ,<ó*˜EœJð !ŸN™N×.Ñ.Ô0Ø Ÿ:Ÿ:š:Ø)-×)<Ñ)<Ø %§
¡
¨Ló*˜EžJñ 1ð ×&Ñ& t¯\©\«^Ó<ˆçØ—?‘? 4¨¨ <Ø#.°S°T°
ó<Ø=AÀ1ðEð Eð ×$Ñ$ XØ%*§[¡[°£^Ø%0·,±,³.ÀÕ2DóFàGKÈQðOð Or   c               ó$   € V ^8„  d   QhRRRRRR/# )r	   r~   r+   Úparentsz	list[str]r   ro   r   )r   s   "r   r   r9   M  s#   € ÷ "ñ "Ð(<ð "Àyð "ÐUYñ "r   c                óè   € . pVeK   Ve*   VP                  VP                  P                  4       4       V P                  P	                  V4      pKN  VP                  4        VP                  V4       R# )zBuild the ancestor list.N)r�   rŸ   r™   Ú
parent_maprŒ   ru   Úextend)r.   r~   rª   rE   s   &&& r   Ú__build_ancestorsÚ!InlineProcessor.__build_ancestorsM  sZ   € àˆ	ØÒ ØÒ!Ø× Ñ  §¡×!1Ñ!1Ó!3Ô4Ø—_‘_×(Ñ(¨Ó0ŠFØ×ÑÔØ�‰�yÖ!r   Nc               ó$   € V ^8„  d   QhRRRRRR/# )r	   Útreer*   rE   zlist[str] | Noner   r   )r   s   "r   r   r9   W  s'   € ÷ Eñ E˜ð EÐ2Bð EÈmñ Er   c                óø  € / V n         Vf   . MVR,          pVP                  4        UUu/ uF  qD F  qUVbK  	  K  	  uppV n        W3.pV'       Ed¢   VP                  ^ 4      w  rxW€n        V P                  WpP                  4       . p	V EF%  p
V
P                  '       dä   \        V
P                  \        P                  4      '       gº   V P                  P                  V
P                  P                  4       4       V
P                  pRV
n        V P                  V P                  V4      V
4      pV F  pW P                  V^ ,          &   K  	  Wl,          pV	P                  W¬34       V P                  P                  4        V
P                  '       dÖ   V P                  V
P                  4      p\         P"                  ! R4      pRV
n        V P                  WïR4      pVP                  '       d   VP                  V
n        \%        V4      P'                  V
4      ^,           pVP)                  4        V F1  pWpP                  V^ ,          &   VP+                  VV^ ,          4       K3  	  \-        V
4      '       g   EKô  WpP                  V
&   VP                  W P                  R,          34       EK(  	  V	 F6  w  pp\/        V4       F!  w  ppV^ ,          pVP+                  VV4       K#  	  K8  	  EKª  V# u uppi )a_  Apply inline patterns to a parsed Markdown tree.

Iterate over `Element`, find elements with inline tag, apply inline
patterns and append newly created Elements to tree.  To avoid further
processing of string with inline patterns, instead of normal string,
use subclass [`AtomicString`][markdown.util.AtomicString]:

    node.text = markdown.util.AtomicString("This will not be processed.")

Arguments:
    tree: `Element` object, representing Markdown tree.
    ancestors: List of parent tag names that precede the tree node (if needed).

Returns:
    An element tree object with applied inline patterns.

Nrˆ   ÚdF)rK   Úiterr¬   r¡   rE   Ú!_InlineProcessor__build_ancestorsrq   r"   r   r#   r�   rŸ   r™   rs   r    rr   ÚetreeÚElementrt   rS   ru   rv   r@   Ú	enumerate)r.   r±   rE   Útree_parentsÚpÚcÚstackÚcurrElementrª   ÚinsertQueuer’   rq   ÚlstÚitemrr   ÚdumbyÚ
tailResultrx   ry   ÚelementÚiÚobjs   &&&                   r   r/   ÚInlineProcessor.runW  sc  € ð$ >@ˆÔð 'Ò.‘r°I¸aµLˆà)-¯©¬Ô@© Aºa¸˜aš4¹a™1©Ò@ˆŒØÐ%Ð&ˆçˆeØ#(§9¡9¨Q£<Ñ ˆKà$ŒNØ×"Ñ" ;·±Ô?àˆKÜ$�Ø—:—:�:¤jØ—J‘J¤× 1Ñ 1÷'ò 'ð —N‘N×)Ñ)¨%¯)©)¯/©/Ó*;Ô<Ø Ÿ:™:�DØ!%�E”JØ×4Ñ4Ø×+Ñ+¨DÓ1°5ó�Có !$˜Ø38Ÿ™¨¨Q­Ó0ñ !$à•L�EØ×&Ñ&¨ |Ô4Ø—N‘N×&Ñ&Ô(Ø—:—:�:Ø×.Ñ.¨u¯z©zÓ:�DÜ!ŸMšM¨#Ó.�EØ!%�E”JØ!%×!;Ñ!;¸DÈÓ!O�JØ—z—z�zØ%*§Z¡Z˜œ
Ü˜{Ó+×1Ñ1°%Ó8¸1Õ<�CØ×&Ñ&Ô(Û$.˜Ø7BŸ™¨°­Ñ4Ø#×*Ñ*¨3°¸µÖ<ñ %/ô �u—:•:Ø-8—O‘O EÑ*Ø—L‘L %¯©¸Õ):Ð!;×<ñ; %ó> !,‘�˜Ü'¨žn‘F�A�sØ" 1�v�HØ—N‘N 1 hÖ/ó -ô !,ð ˆùó[ As   ªK6)	Ú__placeholder_lengthÚ__placeholder_prefixÚ__placeholder_reÚ__placeholder_suffixrE   rD   r
   r¬   rK   )é    )T©N)r1   r2   r3   r4   r5   rF   r_   r‹   r¢   r    rŽ   rs   rf   rµ   r/   r6   r   r   r   r   r   K   sE   † ñõ'õõ#õ$÷÷.*÷:O÷bNOõ`"÷Eó Er   r   c                  ó2   € ] tR tRtRtR R ltR R ltRtR# )	r   iŸ  z&Add line breaks to the html document. c               ó    € V ^8„  d   QhRRRR/# )r	   Úelemr*   r   ro   r   )r   s   "r   r   Ú"PrettifyTreeprocessor.__annotate__¢  s   € ÷ ñ  =ð °Tñ r   c                óz  € RpV P                   P                  VP                  4      '       dÔ   VP                  R9  dÃ   VP                  '       d!   VP                  P	                  4       '       gJ   \        V4      '       d9   V P                   P                  V^ ,          P                  4      '       d   W!n        V FA  pV P                   P                  VP                  4      '       g   K0  V P                  V4       KC  	  VP                  '       d!   VP                  P	                  4       '       g	   W!n        R# R# )z7Recursively add line breaks to `ElementTree` children. Ú
N)ÚcodeÚpre)r
   Úis_block_levelrŸ   rq   r�   r@   Ú_prettifyETreerr   )r.   rÏ   rÄ   Úes   &&  r   rÖ   Ú$PrettifyTreeprocessor._prettifyETree¢  sÆ   € ð ˆØ�7‰7×!Ñ! $§(¡(×+Ò+°·±ÀÔ0OØ—I—I�I T§Y¡Y§_¡_×%6Ò%6Ü˜DŸ	š	 d§g¡g×&<Ñ&<¸TÀ!½W¿[¹[×&IÒ&IØ”	Û�Ø—7‘7×)Ñ)¨!¯%©%×0Ô0Ø×'Ñ'¨Ö*ñ ð �y�yˆy §	¡	§¡× 1Ò 1ØŽIñ !2r   c               ó    € V ^8„  d   QhRRRR/# ©r	   r)   r*   r   ro   r   )r   s   "r   r   rÐ   °  s   € ÷ Mñ M˜ð M¨$ñ Mr   c                ó\  € V P                  V4       VP                  R4      pV FV  pVP                  '       d!   VP                  P                  4       '       g
   RVn        K>  RVP                  ,          Vn        KX  	  VP                  R4      pV F–  p\	        V4      '       g   K  V^ ,          P
                  R8X  g   K0  V^ ,          p\	        V4      '       d   KL  VP                  f   K\  \        P                  ! VP                  P                  4       R,           4      Vn        K˜  	  R# )z6Add line breaks to `Element` object and its children. ÚbrrÒ   z
%srÔ   rÓ   N)
rÖ   r´   rr   r�   r@   rŸ   rq   r   r#   Úrstrip)r.   r)   ÚbrsrÜ   ÚpresrÔ   rÓ   s   &&     r   r/   ÚPrettifyTreeprocessor.run°  sÊ   € ð 	×Ñ˜DÔ!ð �i‰i˜‹oˆÛˆBØ—7—7�7 "§'¡'§-¡-§/¢/Ø�–à  2§7¡7Õ*�–ñ	 ð �y‰y˜ÓˆÛˆCÜ�3�xŒx˜C �FŸJ™J¨&Ö0Ø˜1•v�ä˜4—y”y T§Y¡YÔ%:Ü $× 1Ò 1°$·)±)×2BÑ2BÓ2DÀtÕ2KÓ L�D–Ió r   r   N)r1   r2   r3   r4   r5   rÖ   r/   r6   r   r   r   r   r   Ÿ  s   † Ù1õ÷Mñ Mr   r   c                  óª   € ] tR tRtRt]P                  ! RP                  ]P                  ]P                  4      4      tR R ltR R ltR R	 ltR
tR# )r   iÆ  zRestore escaped chars z	{}(\d+){}c               ó    € V ^8„  d   QhRRRR/# )r	   rY   zre.Match[str]r   r$   r   )r   s   "r   r   Ú"UnescapeTreeprocessor.__annotate__Ë  s   € ÷ $ñ $˜=ð $¨Sñ $r   c                	óH   € \        \        VP                  ^4      4      4      # )rƒ   )ÚchrrT   rW   )r.   rY   s   &&r   Ú	_unescapeÚUnescapeTreeprocessor._unescapeË  s   € Ü”3�q—w‘w˜q“z“?Ó#Ð#r   c               ó    € V ^8„  d   QhRRRR/# )r	   rq   r$   r   r   )r   s   "r   r   rã   Î  s   € ÷ 1ñ 1˜Sð 1 Sñ 1r   c                	óN   € V P                   P                  V P                  V4      # rÌ   )ÚREÚsubræ   )r.   rq   s   &&r   r   ÚUnescapeTreeprocessor.unescapeÎ  s   € Ø�w‰w�{‰{˜4Ÿ>™>¨4Ó0Ð0r   c               ó    € V ^8„  d   QhRRRR/# rÚ   r   )r   s   "r   r   rã   Ñ  s   € ÷ 4ñ 4˜ð 4¨$ñ 4r   c                ó�  € VP                  4        F±  pVP                  '       d2   VP                  R8X  g!   V P                  VP                  4      Vn        VP                  '       d!   V P                  VP                  4      Vn        VP                  4        F%  w  r4VP                  W0P                  V4      4       K'  	  K³  	  R# )z.Loop over all elements and unescape all text. rÓ   N)r´   rq   rŸ   r   rr   ÚitemsÚset)r.   r)   rÏ   ÚkeyÚvalues   &&   r   r/   ÚUnescapeTreeprocessor.runÑ  s~   € à—I‘I–KˆDà�y�yˆy §¡¨VÔ!3Ø ŸM™M¨$¯)©)Ó4�”	à�y�yˆyØ ŸM™M¨$¯)©)Ó4�”	à"Ÿj™jžl‘
�Ø—‘˜Ÿm™m¨EÓ2Ö3ó +ó  r   r   N)r1   r2   r3   r4   r5   ÚreÚcompiler   r   ÚSTXr>   rê   ræ   r   r/   r6   r   r   r   r   r   Æ  s<   † Ù!à	�Š�L×'Ñ'¨¯©°$·(±(Ó;Ó	<€Bõ$õ1÷4ñ 4r   r   )r5   Ú
__future__r   rô   Úxml.etree.ElementTreer¶   ÚElementTreeÚtypingr   r   r‰   r   r   Úmarkdownr   r   r%   Ú	Processorr'   r   r   r   r   r   r   Ú<module>rý      sk   ðñ(õ #ã 	ß %Ð %ß %Ý Ý çÝ!õõô�D—N‘Nô ô(Q�mô Qôh
$M˜Mô $MôN4˜Mö 4r   