summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rbot/core/utils/extends.rb4
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+/, ' ')