summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-18 17:31:26 +0000
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2007-09-18 17:31:26 +0000
commita158d5f941b5e5ee6bd53b627771c163b323ab12 (patch)
treeb219ddbe9954fa0fe6d57961d519f5e6e84d7b08 /lib
parentadb212bdfc678af04fa438b42ec06047a13a8f2c (diff)
first_html_par: it's doc.root.search, not doc.root.each
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/core/utils/utils.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rbot/core/utils/utils.rb b/lib/rbot/core/utils/utils.rb
index 9b678def..80f779e9 100644
--- a/lib/rbot/core/utils/utils.rb
+++ b/lib/rbot/core/utils/utils.rb
@@ -488,7 +488,7 @@ module ::Irc
# Strip styles and scripts
(doc/"style|script").remove
- debug doc.inspect
+ debug doc
strip = opts[:strip]
strip = Regexp.new(/^#{Regexp.escape(strip)}/) if strip.kind_of?(String)
@@ -552,7 +552,7 @@ module ::Irc
# we don't need
if by_span.nil?
by_span = Hpricot::Elements[]
- doc.root.each("*") { |el|
+ doc.root.search("*") { |el|
by_span.push el if el.pathname =~ /^(?:div|span|td|tr|tbody|table)$/ and el[:class] =~ /body|message|text/i
}
debug "other \#1: found: #{by_span.pretty_inspect}"