3 lines
475 B
HTML
3 lines
475 B
HTML
{# Unified Diff mit hervorgehobenen Zeilen; genutzt in „Änderungen“ und in der Commit-Ansicht des Repositorys #}
|
|
{% macro diff(text) %}<pre class="aiw-diff text-xs">{% for line in text.splitlines() %}<span class="{{ 'aiw-diff-add' if line.startswith('+') and not line.startswith('+++') else 'aiw-diff-del' if line.startswith('-') and not line.startswith('---') else 'aiw-diff-hunk' if line.startswith('@@') else '' }}">{{ line }}</span>
|
|
{% endfor %}</pre>{% endmacro %}
|