Skip to content

Commit

Permalink
Merge pull request #94 from wapcaplet/93-right-align-line-numbers
Browse files Browse the repository at this point in the history
Issue #93: Right-justify line numbers
  • Loading branch information
abedra committed Mar 9, 2012
2 parents c96ab56 + 3d1eca6 commit 66a5bf5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/rcov/templates/detail.html.erb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
</tbody> </tbody>
</table> </table>
</div> </div>

<h3>Key</h3> <h3>Key</h3>

<div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div> <div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>


<h3>Coverage Details</h3> <h3>Coverage Details</h3>
Expand All @@ -51,8 +51,9 @@
<% fileinfo.num_lines.times do |i| %> <% fileinfo.num_lines.times do |i| %>
<% line = fileinfo.lines[i].chomp %> <% line = fileinfo.lines[i].chomp %>
<% count = fileinfo.counts[i] %> <% count = fileinfo.counts[i] %>
<% width = fileinfo.num_lines.to_s.length %>
<tr class="<%= line_css(i) %>"> <tr class="<%= line_css(i) %>">
<td><pre><a name="line<%= i.next %>"><%= i.next %></a> <%= CGI::escapeHTML(line) %></pre></td> <td><pre><a name="line<%= i.next %>"><%= i.next.to_s.rjust(width) %></a> <%= CGI::escapeHTML(line) %></pre></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
Expand Down

0 comments on commit 66a5bf5

Please sign in to comment.