From 29cd74524abf7568452da7e59903759c267635ed Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 14 Mar 2010 09:29:54 -0400 Subject: HTML line numbers are clickable, and highlight the line on arrival. Also, noticed that IE8 didn't line up the line number properly, so added an unfortunate meta tag to make it right. Closes issue #55. --- coverage/htmlfiles/coverage_html.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'coverage/htmlfiles/coverage_html.js') diff --git a/coverage/htmlfiles/coverage_html.js b/coverage/htmlfiles/coverage_html.js index 2acba5c..b6bde6c 100644 --- a/coverage/htmlfiles/coverage_html.js +++ b/coverage/htmlfiles/coverage_html.js @@ -65,6 +65,14 @@ function index_page_ready($) { // -- pyfile stuff -- +function pyfile_ready($) { + // If we're directed to a particular line number, highlight the line. + var frag = location.hash; + if (frag.length > 2 && frag[1] == 'n') { + $(frag).addClass('highlight'); + } +} + function toggle_lines(btn, cls) { btn = $(btn); var hide = "hide_"+cls; -- cgit v1.2.1