#NEWLINE# def string_repr( self , obj , limit = 70 ) : #NEWLINE# #INDENT# buf = [ '<span class="string">' ] #NEWLINE# escaped = escape ( obj ) #NEWLINE# a = repr ( limit [ : limit ] ) #NEWLINE# b = repr ( escaped [ limit : ] ) #NEWLINE# if ( isinstance ( obj , text_type ) and PY2 ) : #NEWLINE# #INDENT# buf . append ( 'u' ) #NEWLINE# a = a [ 1 : ] #NEWLINE# b = b [ 1 : ] #NEWLINE# #UNINDENT# if ( b != "''" ) : #NEWLINE# #INDENT# buf . extend ( ( a [ : ( - 1 ) ] , '<span class="extended">' , b [ 1 : ] , '</span>' ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# buf . append ( a ) #NEWLINE# #UNINDENT# buf . append ( '</span>' ) #NEWLINE# return _add_subclass_info ( '' . join ( buf ) , obj , ( bytes , text_type ) )