From 0075c58ca0c05ec05bb74732a4f87bd5c701f637 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 28 Jun 2006 23:16:14 +0000 Subject: Encoders::HTML: Removed option caching. --- lib/coderay/encoders/html.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'lib') 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 << '' else @out << text -- cgit v1.2.1