{% for line in html_lines -%}
{%- set line_errors = errors[loop.index] -%}
{%- set line_sev = line_sevs[loop.index] -%}
{%- if line_errors %}
{% for (sev, code, text), count in line_errors.items() %}
-
{{ code }}
{{ text|sentence }}
{%- if count > 1 %} (in {{ count }} places){% endif -%}
{% endfor %}
{%- endif -%}
{{loop.index}} {{ line or ' '|safe }}
{% endfor %}