{% macro content_diff(diff) %}
    <table border="0" cellpadding="0" cellspacing="0" style="margin:0; padding:1em;
            width:100%; font-family:monospace; background-color:#F9F9F9;">
        {% for line in diff -%}
            {% if line[:2] == "+ " -%}
                <tr style="color:#00B000; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em; vertical-align:top;">{{ line[0] }}</td>
                    <td style="font-family:monospace;"><ins style="text-decoration:none;">{{ line[2:] }}</ins></td>
                </tr>
            {% elif line[:2] == "- " -%}
                <tr style="color:#991111; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em; vertical-align:top;">{{ line[0] }}</td>
                    <td style="font-family:monospace;"><del style="text-decoration:none;">{{ line[2:] }}</del></td>
                </tr>
            {% elif line[:2] == "@@" -%}
                <tr style="color:#440088; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em;"></td>
                    <td style="font-family:monospace;">{{ line }}</td>
                </tr>
            {% else -%}
                <tr style="color:#000000; height:1.2em;">
                    <td style="font-family:monospace; width:1.2em;"></td>
                    <td style="font-family:monospace;">{{ line[2:] }}</td>
                </tr>
            {%- endif %}
        {%- endfor %}
    </table>
{% endmacro %}
