Permalink
Browse files

add line number anchors to annotated output

  • Loading branch information...
1 parent c5b9d53 commit fa8de6756f7cc2452de8bb6f6ce8116122e60c4d @dj2 dj2 committed with jscruggs Dec 13, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/templates/awesome/awesome_template.rb
@@ -15,6 +15,7 @@ def write
report.each_pair do |section, contents|
if template_exists?(section)
create_instance_var(section, contents)
+ create_instance_var(:per_file_data, per_file_data)
@html = erbify(section)
html = erbify('layout')
fn = output_filename(section)
@@ -55,7 +56,7 @@ def write_file_data
out << "&nbsp;"
end
out << "</td>"
- out << "<td valign='top'>#{convertor.convert(line)}</td>"
+ out << "<td valign='top'><a name='line#{idx + 1}'>#{convertor.convert(line)}</a></td>"
out << "</tr>"
end
out << "<table></body></html>"

0 comments on commit fa8de67

Please sign in to comment.