From 9629ed554bae9bc0e851203f6c820badd09c43c7 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 29 Jan 2007 19:35:54 +0000 Subject: Fix urban handling of links --- data/rbot/plugins/urban.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'data') diff --git a/data/rbot/plugins/urban.rb b/data/rbot/plugins/urban.rb index d2ea8645..c77a2e45 100644 --- a/data/rbot/plugins/urban.rb +++ b/data/rbot/plugins/urban.rb @@ -60,14 +60,14 @@ class UrbanPlugin < Plugin def get_def(text) # Start by removing the prev/home/next links - t = text.gsub(/(?:prev<\/a> )?home<\/a>(?: next<\/a>)?/,'') + t = text.gsub(/(?:]*>prev<\/a> )?]*>home<\/a>(?: ]*>next<\/a>)?/,'') # Close up paragraphs t.gsub!(/<\/?p>/, ' ') t.gsub!("\n", ' ') # Reverse headings t.gsub!(/<\/?b>/,"#{Reverse}") # Enbolden links - t.gsub!(/<\/?a(?: .*?)?>/,"#{Bold}") + t.gsub!(/<\/?a(?: [^>]*)?>/,"#{Bold}") # Reverse examples t.gsub!(/<\/?(?:i|em)>/,"#{Underline}") # Clear anything else -- cgit v1.2.3