diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-06-16 01:18:34 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-06-16 01:18:34 +0200 |
commit | a6ddf469fadefcd61bf6bb079160d538f02ef427 (patch) | |
tree | f4eabf724edce1f6d512b0f7cebb2747d9bf6a73 /lib/coderay/encoders | |
parent | e423275749744fb2cf768087a07b4c839eaf4734 (diff) | |
parent | dc9528456008216c265cfb6613cfa459c3c9ffad (diff) | |
download | coderay-a6ddf469fadefcd61bf6bb079160d538f02ef427.tar.gz |
Merge branch 'master' into remove-dump
Conflicts:
lib/coderay/tokens.rb
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r-- | lib/coderay/encoders/html/numbering.rb | 4 | ||||
-rw-r--r-- | lib/coderay/encoders/statistic.rb | 1 |
2 files changed, 2 insertions, 3 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 diff --git a/lib/coderay/encoders/statistic.rb b/lib/coderay/encoders/statistic.rb index 2315d9e..b2f8b83 100644 --- a/lib/coderay/encoders/statistic.rb +++ b/lib/coderay/encoders/statistic.rb @@ -67,7 +67,6 @@ Token Types (%d): @type_stats['TOTAL'].count += 1 end - # TODO Hierarchy handling def begin_group kind block_token ':begin_group', kind end |