summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders/html
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-02-13 16:12:48 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2016-02-13 16:12:48 +0100
commit0b8c69cfb7a65bec04c44e58e5776e323d2aa1af (patch)
treefd81bf6229bfc0d173f5b744534a76b5c70eb440 /lib/coderay/encoders/html
parent916711c9983483c39f9a68c29e21a0ed40004bd2 (diff)
parent0a1f500d524ff0fb5eeafef051ccbb641954a87a (diff)
downloadcoderay-paint-integration.tar.gz
Merge branch 'master' into paint-integrationpaint-integration
Diffstat (limited to 'lib/coderay/encoders/html')
-rw-r--r--lib/coderay/encoders/html/numbering.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/coderay/encoders/html/numbering.rb b/lib/coderay/encoders/html/numbering.rb
index 332145b..a1b9c04 100644
--- a/lib/coderay/encoders/html/numbering.rb
+++ b/lib/coderay/encoders/html/numbering.rb
@@ -26,7 +26,7 @@ module Encoders
"<a href=\"##{anchor}\" name=\"#{anchor}\">#{line}</a>"
end
else
- proc { |line| line.to_s } # :to_s.to_proc in Ruby 1.8.7+
+ :to_s.to_proc
end
bold_every = options[:bold_every]
@@ -75,7 +75,7 @@ module Encoders
line_number = start
output.gsub!(/^.*$\n?/) do |line|
line_number_text = bolding.call line_number
- indent = ' ' * (max_width - line_number.to_s.size) # TODO: Optimize (10^x)
+ indent = ' ' * (max_width - line_number.to_s.size)
line_number += 1
"<span class=\"line-numbers\">#{indent}#{line_number_text}</span>#{line}"
end