diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-06 16:50:21 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-02-06 16:50:21 +0000 |
commit | cf804763ed6377010257f73effd32a37969ad604 (patch) | |
tree | 82c9a531e25a97e937beae1fc504a39feeed97c1 | |
parent | bcacf025a0d2cbba181ad3e55fba30926286f9c8 (diff) |
Fix IRCification of HTML strings when only whitespace is present between IRC bold/underline code
-rw-r--r-- | lib/rbot/core/utils/extends.rb | 4 |
1 files 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+/, ' ') |