WebSite::page_hash Better comments detection

This commit is contained in:
erwanlr
2013-04-16 16:42:37 +02:00
parent f904c3241a
commit 788122c5d6
2 changed files with 5 additions and 2 deletions

View File

@@ -85,7 +85,7 @@ class WebSite
def self.page_hash(page)
page = Browser.get(page) unless page.is_a?(Typhoeus::Response)
Digest::MD5.hexdigest(page.body.gsub(/<!--[^>]+-->/, ''))
Digest::MD5.hexdigest(page.body.gsub(/<!--.*?-->/m, ''))
end
def homepage_hash