diff options
author | murphy <murphy@rubychan.de> | 2006-06-28 23:16:14 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2006-06-28 23:16:14 +0000 |
commit | 0075c58ca0c05ec05bb74732a4f87bd5c701f637 (patch) | |
tree | 18dc87ad742f08b58d3c8b76b4b8fe131cd59670 /lib/coderay/encoders | |
parent | 310aa8d7f749894f533cea6a3b887697e77c0ee0 (diff) | |
download | coderay-0075c58ca0c05ec05bb74732a4f87bd5c701f637.tar.gz |
Encoders::HTML: Removed option caching.
Diffstat (limited to 'lib/coderay/encoders')
-rw-r--r-- | lib/coderay/encoders/html.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index 0b43c0c..15ccbc7 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -86,11 +86,6 @@ module Encoders attr_reader :css
- def initialize(*)
- super
- @last_options = nil
- end
-
protected
HTML_ESCAPE = { #:nodoc:
@@ -139,8 +134,6 @@ module Encoders def setup options
super
- return if options == @last_options
- @last_options = options
@HTML_ESCAPE = HTML_ESCAPE.dup
@HTML_ESCAPE["\t"] = ' ' * options[:tab_width]
@@ -221,8 +214,7 @@ module Encoders text = text.gsub(/#{HTML_ESCAPE_PATTERN}/o) { |m| @HTML_ESCAPE[m] }
end
@opened[0] = type
- style = @css_style[@opened]
- if style
+ if style = @css_style[@opened]
@out << style << text << '</span>'
else
@out << text
|