def diff_pretty_html_table(diffs):
    """
    Function to convert a diff array into a pretty HTML report

    :param diffs: Array of diff tuples.  From Googles diff_match_patch library
    :return
        HTML Table

    """
    DIFF_DELETE = -1
    DIFF_INSERT = 1
    DIFF_EQUAL = 0
    html_table = list()
    html_table.append('<html>')
    html_table.append(
        """
        <style>
        body {
            background-color: #e8e3e3;
        }
        table {
            width: 100%;
            border-spacing: 1px;
        }
        td {
            border-left: 1px solid black;
            border-right: 1px solid black;
            font-family: "Lucida Console", "Courier New", "Times New Roman";
            padding-top: 0px;
            padding-left: 5px;
            padding-right: 5px;
            text-align: left;
        }
        </style>
        """
    )
    html_table.append('<table>')
    col_a_html = list()
    col_b_html = list()
    col_a_html.append("<td>")
    col_b_html.append("<td>")
    for (op, data) in diffs:
        text = (data.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;").replace("\n", "<br>"))

        if op == DIFF_DELETE:
            col_a_html.append("<del style=\"background:#ff5050;\">{text}</del>".format(text=text))

        elif op == DIFF_INSERT:
            col_b_html.append("<ins style=\"background:#00ff99;\">{text}</ins>".format(text=text))

        elif op == DIFF_EQUAL:
            col_a_html.append("{text}".format(text=text))
            col_b_html.append("{text}".format(text=text))

    col_a_html.append("</td>")
    col_b_html.append("</td>")
    html_table.append('<tr>{col_a}{col_b}</tr>'.format(col_a=''.join(col_a_html), col_b=''.join(col_b_html)))
    html_table.append('</table>')
    html_table.append('</html>')
    return ''.join(html_table)