From 862bc9aa6b002f6b29cf74f93ca66e63cf370819 Mon Sep 17 00:00:00 2001 From: murphy Date: Wed, 31 Mar 2010 22:17:06 +0000 Subject: Upporting changes from 0.9.2 (vs. 0.9.1). --- lib/coderay/encoders/html.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/coderay/encoders/html.rb') diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb index d43805d..56857dc 100644 --- a/lib/coderay/encoders/html.rb +++ b/lib/coderay/encoders/html.rb @@ -262,7 +262,7 @@ module Encoders @out << (@css_style[@opened] || '') @opened << type when :close - if $CODERAY_DEBUG and @opened.last != type + if $CODERAY_DEBUG and (@opened.size == 1 or @opened.last != type) warn 'Malformed token stream: Trying to close a token (%p) ' \ 'that is not open. Open are: %p.' % [type, @opened[1..-1]] end @@ -283,7 +283,7 @@ module Encoders end @opened << type when :end_line - if $CODERAY_DEBUG and @opened.last != type + if $CODERAY_DEBUG and (@opened.size == 1 or @opened.last != type) warn 'Malformed token stream: Trying to close a line (%p) ' \ 'that is not open. Open are: %p.' % [type, @opened[1..-1]] end -- cgit v1.2.1