{% extends "repo.html" %} {% set active_page = "log" %} {% block title %} {% trans message=data.message|split("\n\n")|first, username=username, repository=repository %}{{ basename }} in {{ username }}/{{ repository }}{% endtrans %} {% endblock %} {% block content %}

{{ data.message | split("\n\n", 1) | first | inline_markdown }}

{{ data.message | split("\n\n", 1) | last | markdown }}

{% trans owner_name=data.owner_name %} {{ owner_name }},
{% endtrans %} {% trans receive_date=data.receive_date.strftime('%A, %e %B %Y, %H:%M:%S'), author_date=data.author_date.strftime("%A, %e %B %Y, %H:%M:%S"), receive_unix=data.receive_date.timestamp() | int, author_unix=data.author_date.timestamp() | int %} created on {{ author_date }} ({{ author_unix }}), received on {{ receive_date }} ({{ receive_unix }}) {% endtrans %}
{% trans %}Author identity:{% endtrans %} {{ data.owner_identity }}

{{ data.sha }} {% for file in diff %}

{{ file }}

{% set vars = namespace(original_line=0, modified_line=0, hunk_started=false) %} {% for line in diff[file] %} {% if line.startswith("@@") %} {% if vars.hunk_started %} {% endif %} {% set vars.hunk_started = true %} {% set diff_location = line|parse_diff_location %} {% set vars.original_line = diff_location[0][0] %} {% set vars.modified_line = diff_location[1][0] %}

{{ line }}

                                {% elif vars.hunk_started %}
                                    {% if line.startswith("+") %}
                                        {{ vars.modified_line }} +
                                        {{ line[1:] }}
                                        {% set vars.modified_line = vars.modified_line + 1 %}
                                    {% elif line.startswith("-") %}
                                        {{ vars.original_line }} -
                                        {{ line[1:] }}
                                        {% set vars.original_line = vars.original_line + 1 %}
                                    {% elif not line.startswith("\\") %}
                                        {% if line %}
                                            {{ vars.modified_line }}  
                                            {{ line[1:] }}
                                        {% endif %}
                                        {% if not line.startswith("@@") %}
                                            {% set vars.original_line = vars.original_line + 1 %}
                                            {% set vars.modified_line = vars.modified_line + 1 %}
                                        {% endif %}
                                    {% endif %}
                                {% endif %}
                            {% endfor %}
                            {% if vars.hunk_started %}
                                
{% endif %}
{% endfor %}
{% endblock %}