#NEWLINE# def detectTabbed( self , lines ) : #NEWLINE# #INDENT# ' Find indented text and remove indent before further proccesing.\n\n        Keyword arguments:\n\n        * lines: an array of strings\n\n        Returns: a list of post processed items and the unused\n        remainder of the original list\n\n        ' #NEWLINE# items = [ ] #NEWLINE# item = ( - 1 ) #NEWLINE# i = 0 #NEWLINE# def detab( line ) : #NEWLINE# #INDENT# match = CORE_RE [ 'tabbed' ] . match ( line ) #NEWLINE# if match : #NEWLINE# #INDENT# return match . group ( 4 ) #NEWLINE# #UNINDENT# #UNINDENT# for line in lines : #NEWLINE# #INDENT# if line . strip ( ) : #NEWLINE# #INDENT# line = detab ( line ) #NEWLINE# if line : #NEWLINE# #INDENT# items . append ( line ) #NEWLINE# i += 1 #NEWLINE# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( items , lines [ i : ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# i += 1 #NEWLINE# for j in range ( i , len ( lines ) ) : #NEWLINE# #INDENT# if lines [ j ] . strip ( ) : #NEWLINE# #INDENT# next_line = lines [ j ] #NEWLINE# break #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# if detab ( next_line ) : #NEWLINE# #INDENT# items . append ( '' ) #NEWLINE# continue #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# i += 1 #NEWLINE# #UNINDENT# return ( items , lines [ self : ] )