#NEWLINE# def run( self , parent , blocks ) : #NEWLINE# #INDENT# sibling = self . lastChild ( parent ) #NEWLINE# block = blocks . pop ( 0 ) #NEWLINE# m = RX . search ( block ) #NEWLINE# if m : #NEWLINE# #INDENT# block = block [ ( m . end ( ) + 1 ) : ] #NEWLINE# #UNINDENT# ( block , theRest ) = self . detab ( blocks ) #NEWLINE# if m : #NEWLINE# #INDENT# klass = m . group ( 1 ) #NEWLINE# div = etree . SubElement ( parent , 'div' ) #NEWLINE# div . set ( 'class' , ( '%s %s' % ( CLASSNAME , klass ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# div = sibling #NEWLINE# #UNINDENT# self . parser . parseChunk ( div , block ) #NEWLINE# if theRest : #NEWLINE# #INDENT# blocks . insert ( 0 , theRest )