#NEWLINE# def autolink( self , link , is_email = False ) : #NEWLINE# #INDENT# 'Rendering a given link or email address.\n\n        :param link: link content or email address.\n        :param is_email: whether this is an email or not.\n        ' #NEWLINE# text = link = escape ( link ) #NEWLINE# if is_email : #NEWLINE# #INDENT# link = ( 'mailto:%s' % link ) #NEWLINE# #UNINDENT# return ( '<a href="%s">%s</a>' % ( link , text ) )