lib/postrank-uri.rb in postrank-uri-1.0.1 vs lib/postrank-uri.rb in postrank-uri-1.0.2
- old
+ new
@@ -81,19 +81,19 @@
urls.compact
end
def extract_href(text, host = nil)
- urls = {}
+ urls = []
Nokogiri.HTML(text).search('a').each do |a|
begin
url = normalize(c18n(unescape(a.attr('href'))))
if url.host.empty?
next if host.nil?
url.host = host
end
- urls[url.to_s] = a.text
+ urls.push [url.to_s, a.text]
rescue
next
end
end
urls
\ No newline at end of file