summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2011-06-11 17:34:21 +0000
committermurphy <murphy@rubychan.de>2011-06-11 17:34:21 +0000
commit473e730ff39b64778caa2b20843a6237d7c592c6 (patch)
treef6fa266b617d19d118f26655e4952a25fea2cd76 /lib/coderay/encoders
parent6e34311c87176aa082b097446558b518a95c0872 (diff)
downloadcoderay-473e730ff39b64778caa2b20843a6237d7c592c6.tar.gz
found a better name for this variable
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r--lib/coderay/encoders/html/numbering.rb10
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)