diff options
Diffstat (limited to 'lib/rbot')
-rw-r--r-- | lib/rbot/core/utils/extends.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/rbot/core/utils/extends.rb b/lib/rbot/core/utils/extends.rb index ff9d0f35..4b7e57f3 100644 --- a/lib/rbot/core/utils/extends.rb +++ b/lib/rbot/core/utils/extends.rb @@ -61,6 +61,12 @@ class ::String txt.gsub!("\n", ' ') txt.gsub!("\r", ' ') + # Superscripts and subscripts are turned into ^{...} and _{...} + # where the {} are omitted for single characters + txt.gsub!(/<sup>(.*?)<\/sup>/, '^{\1}') + txt.gsub!(/<sub>(.*?)<\/sub>/, '_{\1}') + txt.gsub!(/(^|_)\{(.)\}/, '\1\2') + # All other tags are just removed txt.gsub!(/<[^>]+>/, '') |