diff options
author | murphy <murphy@rubychan.de> | 2011-06-11 17:34:21 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-06-11 17:34:21 +0000 |
commit | 473e730ff39b64778caa2b20843a6237d7c592c6 (patch) | |
tree | f6fa266b617d19d118f26655e4952a25fea2cd76 /lib/coderay | |
parent | 6e34311c87176aa082b097446558b518a95c0872 (diff) | |
download | coderay-473e730ff39b64778caa2b20843a6237d7c592c6.tar.gz |
found a better name for this variable
Diffstat (limited to 'lib/coderay')
-rw-r--r-- | lib/coderay/encoders/html/numbering.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/coderay/encoders/html/numbering.rb b/lib/coderay/encoders/html/numbering.rb index 6955598..4e030fd 100644 --- a/lib/coderay/encoders/html/numbering.rb +++ b/lib/coderay/encoders/html/numbering.rb @@ -68,18 +68,18 @@ module Encoders when :inline max_width = (start + line_count).to_s.size line_number = start - opened_tags = [] + nesting = [] output.gsub!(/^.*$\n?/) do |line| line.chomp! - open = opened_tags.join + open = nesting.join line.scan(%r!<(/)?span[^>]*>?!) do |close,| if close - opened_tags.pop + nesting.pop else - opened_tags << $& + nesting << $& end end - close = '</span>' * opened_tags.size + close = '</span>' * nesting.size line_number_text = bolding.call line_number indent = ' ' * (max_width - line_number.to_s.size) # TODO: Optimize (10^x) |