From cf804763ed6377010257f73effd32a37969ad604 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 6 Feb 2007 16:50:21 +0000 Subject: [PATCH] Fix IRCification of HTML strings when only whitespace is present between IRC bold/underline code --- lib/rbot/core/utils/extends.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/rbot/core/utils/extends.rb b/lib/rbot/core/utils/extends.rb index b1da19c5..63aab7f0 100644 --- a/lib/rbot/core/utils/extends.rb +++ b/lib/rbot/core/utils/extends.rb @@ -49,8 +49,8 @@ class ::String txt.gsub!(/<[^>]+>/, '') # Remove double formatting options, since they only waste bytes - txt.gsub!(/#{Bold}\s*#{Bold}/,"") - txt.gsub!(/#{Underline}\s*#{Underline}/,"") + txt.gsub!(/#{Bold}(\s*)#{Bold}/, '\1') + txt.gsub!(/#{Underline}(\s*)#{Underline}/, '\1') # And finally whitespace is squeezed txt.gsub!(/\s+/, ' ') -- 2.39.2