diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js index 4f6eb89e4..22152333e 100644 --- a/coverage/htmlfiles/coverage_html.js +++ b/coverage/htmlfiles/coverage_html.js @@ -231,7 +231,7 @@ coverage.index_ready = function ($) { coverage.pyfile_ready = function ($) { // If we're directed to a particular line number, highlight the line. var frag = location.hash; - if (frag.length > 2 && frag[1] === 'n') { + if (frag.length > 2 && frag[1] === 't') { $(frag).addClass('highlight'); coverage.set_sel(parseInt(frag.substr(2), 10)); } @@ -512,7 +512,7 @@ coverage.finish_scrolling = function () { coverage.init_scroll_markers = function () { var c = coverage; // Init some variables - c.lines_len = $('td.text p').length; + c.lines_len = $('#source p').length; c.body_h = $('body').height(); c.header_h = $('div#header').height(); @@ -526,7 +526,7 @@ coverage.build_scroll_markers = function () { max_line_height = 10, visible_window_h = $(window).height(); - c.lines_to_mark = $('td.text').find('p.show_run, p.show_mis, p.show_exc, p.show_par'); + c.lines_to_mark = $('#source').find('p.show_run, p.show_mis, p.show_exc, p.show_exc, p.show_par'); $('#scroll_marker').remove(); // Don't build markers if the window has no scroll bar. if (c.body_h <= visible_window_h) { diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html index d4a86ff39..2154c06c4 100644 --- a/coverage/htmlfiles/pyfile.html +++ b/coverage/htmlfiles/pyfile.html @@ -68,45 +68,26 @@

- - - - - {% if show_contexts -%} - - {% endif %} - -
-{% for line in lines -%} -

{{line.number}}

-{% endfor %} -
-{# 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 -%} -

{#-#} - {% if line.annotate -%} - {{line.annotate}}{#-#} - {{line.annotate_long}}{#-#} - {% endif -%} - {{line.html}} {#-#} -

-{% endfor %} -
- {% for line in lines -%} -

{#-#} - {% if line.contexts -%} - {{ line.contexts|len }} ctx{#-#} - - {% for context in line.contexts -%} - {{context}}{#-#} - {% endfor -%} - {#-#} - {% endif -%} -   -

{#-#} - {% endfor %} -
+ {# 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 -%} +

{#-#} + {{line.number}}{#-#} + {{line.html}} {#-#} + {% if line.annotate -%} + {{line.annotate}}{#-#} + {{line.annotate_long}}{#-#} + {% endif -%} + {% if line.contexts -%} + {{ line.contexts|len }} ctx{#-#} + + {% for context in line.contexts -%} + {{context}}{#-#} + {% endfor -%} + {#-#} + {% endif -%} +

+ {% endfor %}