@library.global_function
def format_comment(rev, previous_revision=None):
 prev_rev = getattr(rev, 'previous_revision', previous_revision)
 if (prev_rev is None):
  prev_rev = rev.previous
 comment = bugize_text((rev.comment if rev.comment else ''))
 if (prev_rev and (prev_rev.slug != rev.slug)):
  comment += (jinja2.Markup('<span class="slug-change"><span>%s</span> <i class="icon-long-arrow-right" aria-hidden="true"></i> <span>%s</span></span>') % (prev_rev.slug, rev.slug))
 return comment

@ library . global_function def format_comment ( rev , previous_revision = None ) : prev_rev = getattr ( rev , 'previous_revision' , previous_revision ) if ( prev_rev is None ) : prev_rev = rev . previous comment = bugize_text ( ( rev . comment if rev . comment else '' ) ) if ( prev_rev and ( prev_rev . slug != rev . slug ) ) : comment += ( jinja2 . Markup ( '<span class="slug-change"><span>%s</span> <i class="icon-long-arrow-right" aria-hidden="true"></i> <span>%s</span></span>' ) % ( prev_rev . slug , rev . slug ) ) return comment
massages revision comment content after the fact .