{% for line in diffs[edit.ident] %}
{% set line_space = false %}
{% if line.startswith('@@') or line.startswith('---') or line.startswith('+++') %}
{% set line_color = "lightblue" %}{# a light blue #}
{% elif line.startswith('+') %}
{% set line_color = "#a4efa4" %}{# a light green #}
{% elif line.startswith('-') %}
{% set line_color = "#ffa3a3" %}{# a light red #}
{% else %}
{% set line_color = "#eee" %}{# almost white #}
{% set line_space = true %}
{% endif %}
{% endif %}
{% if line_space %} {% endif %}{{ line.strip() }}{% endfor %}