You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is only a minor annoyance, but it would be nice if the line numbers in HTML source listings (generated by lib/rcov/templates/detail.html.erb) were right-aligned, so the code indentation would appear more consistent. For example, here's how it looks now:
7 def foo(x)
8 if x > 5
9 puts 'x > 5'
10 else
11 puts 'x <= 5'
12 end
13 end
Note the subtle shift in indentation between lines 9 and 10, caused by the single-digit line numbers not having any padding. The padding could be on either side, but I'd prefer it on the left (since that's how Vim does it):
7 def foo(x)
8 if x > 5
9 puts 'x > 5'
10 else
11 puts 'x <= 5'
12 end
13 end
This looks like a pretty easy fix--count the digits in the maximum line number, then use rjust to add some spaces; I will work on a patch and submit a pull request.
The text was updated successfully, but these errors were encountered:
This issue is only a minor annoyance, but it would be nice if the line numbers in HTML source listings (generated by
lib/rcov/templates/detail.html.erb
) were right-aligned, so the code indentation would appear more consistent. For example, here's how it looks now:Note the subtle shift in indentation between lines 9 and 10, caused by the single-digit line numbers not having any padding. The padding could be on either side, but I'd prefer it on the left (since that's how Vim does it):
This looks like a pretty easy fix--count the digits in the maximum line number, then use
rjust
to add some spaces; I will work on a patch and submit a pull request.The text was updated successfully, but these errors were encountered: