Submit
Path:
~
/
/
usr
/
lib
/
python2.7
/
site-packages
/
docutils
/
transforms
/
File Content:
misc.pyc
� >��Xc @ sx d Z d Z d d l m Z d d l m Z m Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d S( s Miscellaneous transforms. t reStructuredTexti����( t nodes( t Transformt TransformErrort CallBackc B s e Z d Z d Z d � Z RS( s� Inserts a callback into a document. The callback is called when the transform is applied, which is determined by its priority. For use with `nodes.pending` elements. Requires a ``details['callback']`` entry, a bound method or function which takes one parameter: the pending node. Other data can be stored in the ``details`` attribute or in the object hosting the callback method. i� c C s. | j } | j d | � | j j | � d S( Nt callback( t startnodet detailst parentt remove( t selft pending( ( s: /tmp/pip-build-uEGWVr/docutils/docutils/transforms/misc.pyt apply s ( t __name__t __module__t __doc__t default_priorityR ( ( ( s: /tmp/pip-build-uEGWVr/docutils/docutils/transforms/misc.pyR s t ClassAttributec B s e Z d Z d Z d � Z RS( s| Move the "class" attribute specified in the "pending" node into the immediately following non-comment element. i� c C s | j } | j } | } x� | r� x� t | j | � d t | � � D]b } | | } t | t j � sD t | t j � r~ qD n | d c | j d 7<| j j | � d SW| } | j } q W| j j j d | j d t j | j | j � d | j �} | j | � d S( Ni t classest classs, No suitable element following "%s" directivet directivet line( R R t ranget indext lent isinstanceR t Invisiblet system_messageR R t documentt reportert errort literal_blockt rawsourceR t replace_self( R R R t childR t elementR ( ( s: /tmp/pip-build-uEGWVr/docutils/docutils/transforms/misc.pyR , s( ) ( R R R R R ( ( ( s: /tmp/pip-build-uEGWVr/docutils/docutils/transforms/misc.pyR # s t Transitionsc B s&