Ñò éíÑXc @ sz d d k Z d d k Z d „ Z d f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d S( iÿÿÿÿNc C s t | t ƒ p t | t ƒ S( s Check if it's string ( t isinstancet unicodet str( t s( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyt isString s t Processorc B s e Z d d „ Z RS( c C s | o | | _ n d S( N( t markdown( t selft markdown_instance( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyt __init__ s N( t __name__t __module__t NoneR ( ( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyR s t Treeprocessorc B s e Z d Z d „ Z RS( s' Treeprocessors are run on the ElementTree object before serialization. Each Treeprocessor implements a "run" method that takes a pointer to an ElementTree, modifies it as necessary and returns an ElementTree object. Treeprocessors must extend markdown.Treeprocessor. c C s d S( s" Subclasses of Treeprocessor should implement a `run` method, which takes a root ElementTree. This method can return another ElementTree object, and the existing root ElementTree will be replaced, or it can modify the current tree and return None. N( ( R t root( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyt run s ( R R t __doc__R ( ( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyR s t InlineProcessorc B sh e Z d Z d „ Z d „ Z d „ Z d „ Z d d „ Z e d „ Z d „ Z d d „ Z d „ Z RS( sJ A Treeprocessor that traverses a tree, applying inline patterns. c C sa t i | _ t i | _ d t | i ƒ t | i ƒ | _ t i t i d ƒ | _ | | _ d S( Ni s ([0-9]{4})( R t INLINE_PLACEHOLDER_PREFIXt$ _InlineProcessor__placeholder_prefixt ETXt$ _InlineProcessor__placeholder_suffixt lent$ _InlineProcessor__placeholder_lengtht ret compilet INLINE_PLACEHOLDERt _InlineProcessor__placeholder_re( R t md( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyR ' s #c C s* d t | i ƒ } t i | } | | f S( s Generate a placeholder s %04d( R t stashed_nodesR R ( R t typet idt hash( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyt __makePlaceholder/ s c C sH | i i | | ƒ } | o | i d ƒ | i ƒ f Sd | d f Sd S( sö Extract id from data string, start from index Keyword arguments: * data: string * index: index, from which we start search Returns: placeholder id and string index, after the found placeholder. i N( R t searcht groupt endR ( R t datat indext m( ( s; /usr/lib/python2.6/site-packages/markdown/treeprocessors.pyt __findPlaceholder5 s c C s&