summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r--coverage/htmlfiles/pyfile.html14
1 files changed, 11 insertions, 3 deletions
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index fb8e131e..b8336760 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -71,13 +71,21 @@
<table>
<tr>
<td class="linenos">
- {% for line in lines %}
+ {% for line in lines -%}
<p id="n{{line.number}}" class="{{line.class}}"><a href="#n{{line.number}}">{{line.number}}</a></p>
{% endfor %}
</td>
<td class="text">
- {% for line in lines %}
- <p id="t{{line.number}}" class="{{line.class}}">{% if line.annotate %}<span class="annotate short">{{line.annotate}}</span><span class="annotate long">{{line.annotate_long}}</span>{% endif %}{{line.html}}<span class="strut">&nbsp;</span></p>
+ {# These are the source lines, which are very sensitive to whitespace. #}
+ {# The `{ # - # }` below are comments which slurp up the following space. #}
+ {% for line in lines -%}
+ <p id="t{{line.number}}" class="{{line.class}}">{#-#}
+ {% if line.annotate -%}
+ <span class="annotate short">{{line.annotate}}</span>{#-#}
+ <span class="annotate long">{{line.annotate_long}}</span>{#-#}
+ {% endif -%}
+ {{line.html}}<span class="strut">&nbsp;</span>{#-#}
+ </p>
{% endfor %}
</td>
</tr>