summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2009-09-23 11:00:53 -0400
committerNed Batchelder <ned@nedbatchelder.com>2009-09-23 11:00:53 -0400
commite3ff72a32401f97b4e3f8e627780c87366d62414 (patch)
tree9b965e865b7f3da28933dae40bd73a7b539a39c4 /coverage/htmlfiles
parent0b96d1ba8b0fb03628a57e255b39243c66751038 (diff)
downloadpython-coveragepy-git-e3ff72a32401f97b4e3f8e627780c87366d62414.tar.gz
Syntax coloring in the HTML reports.
Diffstat (limited to 'coverage/htmlfiles')
-rw-r--r--coverage/htmlfiles/pyfile.html2
-rw-r--r--coverage/htmlfiles/style.css14
2 files changed, 15 insertions, 1 deletions
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index d1810fa1..a7cd1d3c 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -43,7 +43,7 @@ function toggle_lines(btn, cls) {
</td>
<td class='text' valign='top'>
{% for line in lines %}
- <p class='{{line.class}}'>{{line.text.rstrip|escape|not_empty}}</p>
+ <p class='{{line.class}}'>{{line.html}}<span class="strut">&nbsp;</span></p>
{% endfor %}
</td>
</tr>
diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css
index d9d324c4..ef57755b 100644
--- a/coverage/htmlfiles/style.css
+++ b/coverage/htmlfiles/style.css
@@ -124,6 +124,20 @@ td.text {
background: inherit;
}
+/* Syntax coloring */
+.text .com {
+ color: green;
+ font-style: italic;
+ line-height: 1px;
+ }
+.text .key {
+ font-weight: bold;
+ line-height: 1px;
+ }
+.text .str {
+ color: #000080;
+ }
+
/* index styles */
#index td, #index th {
text-align: right;