+
    f0i
                        R t ^ RIHt ^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
 ]
'       d
   ^ RIHu Ht ]P                  ! R4      t ! R R]4      t ! R	 R
]4      tR tR# )a<  
An extension to Python Markdown which implements legacy attributes.

Prior to Python-Markdown version 3.0, the Markdown class had an `enable_attributes`
keyword which was on by default and provided for attributes to be defined for elements
using the format `{@key=value}`. This extension is provided as a replacement for
backward compatibility. New documents should be authored using `attr_lists`. However,
numerous documents exist which have been using the old attribute format for many
years. This extension can be used to continue to render those documents correctly.
)annotationsN)TreeprocessorisString)	Extension)TYPE_CHECKINGz\{@([^\}]*)=([^\}]*)}c                  .    ] tR t^-tR R ltR R ltRtR# )LegacyAttrsc                    V ^8  d   QhRRRR/# )   docetree.ElementreturnNone )formats   "f/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/markdown/extensions/legacy_attrs.py__annotate__LegacyAttrs.__annotate__.   s     	= 	=} 	= 	=    c                   VP                  4        F  pVP                  RR4      pVe"   VP                  RV P                  W#4      4       VP                  '       d<   \        VP                  4      '       d!   V P                  W"P                  4      Vn        VP                  '       g   K  \        VP                  4      '       g   K  V P                  W"P                  4      Vn        K  	  R# )z2Find and set values of attributes ({@key=value}). altN)itergetsethandleAttributestextr   tail)selfr   elr   s   &&  r   runLegacyAttrs.run.   s    ((*B&&%Cud33B<=www8BGG,,//GG<www8BGG,,//GG< r   c               $    V ^8  d   QhRRRRRR/# )r
   r   r   txtstrr   r   )r   s   "r   r   r   9   s!     3 3= 3s 3s 3r   c                @   a R V3R llp\         P                  W24      # )z4Set attributes and return text without definitions. c                   V ^8  d   QhRR/# )r
   matchzre.Match[str]r   )r   s   "r   r   2LegacyAttrs.handleAttributes.<locals>.__annotate__;   s     	F 	F] 	Fr   c                   < SP                  V P                  ^4      V P                  ^4      P                  RR4      4       R# )   
 N)r   groupreplace)r&   r   s   &r   attributeCallback7LegacyAttrs.handleAttributes.<locals>.attributeCallback;   s.    FF5;;q>5;;q>#9#9$#DEr   )ATTR_REsub)r   r   r"   r.   s   &f& r   r   LegacyAttrs.handleAttributes9   s    	F 	F{{,22r   r   N)__name__
__module____qualname____firstlineno__r   r   __static_attributes__r   r   r   r   r   -   s    	=3 3r   r   c                      ] tR t^@tR tRtR# )LegacyAttrExtensionc                R    VP                   P                  \        V4      R^4       R# )z(Add `LegacyAttrs` to Markdown instance. legacyattrsN)treeprocessorsregisterr   )r   mds   &&r   extendMarkdown"LegacyAttrExtension.extendMarkdownA   s    
"";r?M2Fr   r   N)r3   r4   r5   r6   r?   r7   r   r   r   r9   r9   @   s    Gr   r9   c                     \        R/ V B # )Nr   )r9   )kwargss   ,r   makeExtensionrC   F   s    (((r   )__doc__
__future__r   remarkdown.treeprocessorsr   r   markdown.extensionsr   typingr   xml.etree.ElementTreeetreeElementTreecompiler0   r   r9   rC   r   r   r   <module>rN      sT   (	 # 	 ; )  )) **-
.3- 3&G) G)r   