code: def diff_prettyHtml(self, diffs):
      
      html = []
      for (op, data) in diffs:
        text = (data.replace("&", "&amp;").replace("<", "&lt;")
                   .replace(">", "&gt;").replace("\n", "&para;<br>"))
        if op == self.DIFF_INSERT:
          html.append("<ins style=\"background:#e6ffe6;\">%s</ins>" % text)
        elif op == self.DIFF_DELETE:
          html.append("<del style=\"background:#ffe6e6;\">%s</del>" % text)
        elif op == self.DIFF_EQUAL:
          html.append("<span>%s</span>" % text)
      return "".join(html)
docs: Convert a diff array into a pretty HTML report.
  
      Args:
        diffs: Array of diff tuples.
  
      Returns:
        HTML representation.