def fmt_diff(value, diff, idx):
 if (diff is None):
  return value
 diffvalue = escape(force_text(diff[idx]))
 return html_diff(diffvalue, value)

def fmt_diff ( value , diff , idx ) : if ( diff is None ) : return value diffvalue = escape ( force_text ( diff [ idx ] ) ) return html_diff ( diffvalue , value )
format diff if there is any .