summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r--lib/coderay/encoders/html/numerization.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/coderay/encoders/html/numerization.rb b/lib/coderay/encoders/html/numerization.rb
index c5d96f3..19c760e 100644
--- a/lib/coderay/encoders/html/numerization.rb
+++ b/lib/coderay/encoders/html/numerization.rb
@@ -57,8 +57,10 @@ module Encoders
line = start
gsub!(/^/) do
line_number = bolding.call line
+ indent = ' ' * (max_width - line.to_s.size)
+ res = "<span class=\"no\">#{indent}#{line_number}</span> "
line += 1
- "<span class=\"no\">#{ line_number.rjust(max_width) }</span> "
+ res
end
when :table