#NEWLINE# def process_text( self , node ) : #NEWLINE# #INDENT# '\n        Return a pyth Text object from a BeautifulSoup node or None if\n        the text is empty.\n        ' #NEWLINE# text = node . string . strip ( ) #NEWLINE# if ( not text ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# properties = dict ( ) #NEWLINE# if self . is_bold ( node ) : #NEWLINE# #INDENT# properties [ 'bold' ] = True #NEWLINE# #UNINDENT# if self . is_italic ( node ) : #NEWLINE# #INDENT# properties [ 'italic' ] = True #NEWLINE# #UNINDENT# if self . url ( node ) : #NEWLINE# #INDENT# properties [ 'url' ] = self . url ( node ) #NEWLINE# #UNINDENT# if self . is_sub ( node ) : #NEWLINE# #INDENT# properties [ 'sub' ] = True #NEWLINE# #UNINDENT# if self . is_super ( node ) : #NEWLINE# #INDENT# properties [ 'super' ] = True #NEWLINE# #UNINDENT# content = [ node . string ] #NEWLINE# return document . Text ( properties , self )