# File lib/wrongdoc/final.rb, line 30 def killkillkill!(doc) unlink = proc { |node| node.unlink } # JavaScript is dangerous doc.search("script").each(&unlink) # if your project's big enough to need JS search, it's too bloated doc.search('span.search-toggle').each(&unlink) doc.search('form').each(&unlink) # remove W3C validator link, we use tidy instead doc.search('div#validator-badges p').each { |x| /Validate/i =~ x.content and x.unlink } # this shows up in browsers that don't do stylesheets doc.search('div#no-class-search-results').each(&unlink) end