diff --git a/Makefile b/Makefile index 4df0b76..773bef9 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -UTIL_VERSION := 0.5.24 +UTIL_VERSION := 0.5.25 UTIL_NAME := codeplag PWD := $(shell pwd) diff --git a/src/templates/general.templ b/src/templates/general.templ index 2644cfe..21f297d 100644 --- a/src/templates/general.templ +++ b/src/templates/general.templ @@ -117,27 +117,29 @@ {{ _("Similarity") }}, % {% for first_head in same_parts_of_second %} - {% set second_head = same_parts_of_second[first_head][0].name %} - - {{ first_head }} - {{ second_head }} - {% set head_percent = same_parts_of_second[first_head].pop(0).percent %} - {% if head_percent > threshold %} - {{ head_percent }} - {% else %} - {{ head_percent }} - {% endif %} - - {% for same_head_info in same_parts_of_second[first_head] %} - - {{ same_head_info.name }} - {% if same_head_info.percent > threshold %} - {{ same_head_info.percent }} - {% else %} - {{ same_head_info.percent }} + {% if same_parts_of_second[first_head] %} + {% set second_head = same_parts_of_second[first_head][0].name %} + + {{ first_head }} + {{ second_head }} + {% set head_percent = same_parts_of_second[first_head].pop(0).percent %} + {% if head_percent > threshold %} + {{ head_percent }} + {% else %} + {{ head_percent }} + {% endif %} + + {% for same_head_info in same_parts_of_second[first_head] %} + + {{ same_head_info.name }} + {% if same_head_info.percent > threshold %} + {{ same_head_info.percent }} + {% else %} + {{ same_head_info.percent }} + {% endif %} + + {% endfor %} {% endif %} - - {% endfor %} {% endfor %} @@ -148,27 +150,29 @@ {% for first_head in same_parts_of_first %} - {% set second_head = same_parts_of_first[first_head][0].name %} - - - - {% set head_percent = same_parts_of_first[first_head].pop(0).percent %} - {% if head_percent > threshold %} - - {% else %} - - {% endif %} - - {% for same_head_info in same_parts_of_first[first_head] %} - - - {% if same_head_info.percent > threshold %} - - {% else %} - + {% if same_parts_of_first[first_head] %} + {% set second_head = same_parts_of_first[first_head][0].name %} + + + + {% set head_percent = same_parts_of_first[first_head].pop(0).percent %} + {% if head_percent > threshold %} + + {% else %} + + {% endif %} + + {% for same_head_info in same_parts_of_first[first_head] %} + + + {% if same_head_info.percent > threshold %} + + {% else %} + + {% endif %} + + {% endfor %} {% endif %} - - {% endfor %} {% endfor %}
{{ _("Similarity") }}, %
{{ first_head }}{{ second_head }}{{ head_percent }}{{ head_percent }}
{{ same_head_info.name }}{{ same_head_info.percent }}{{ same_head_info.percent }}
{{ first_head }}{{ second_head }}{{ head_percent }}{{ head_percent }}
{{ same_head_info.name }}{{ same_head_info.percent }}{{ same_head_info.percent }}