class TavernKeeper::Scrubber::StandardStrip

Public Class Methods

new() click to toggle source
# File lib/tavern-keeper/scrubber/standard_strip.rb, line 5
def initialize
  @direction = :top_down
end

Public Instance Methods

scrub(node) click to toggle source
# File lib/tavern-keeper/scrubber/standard_strip.rb, line 9
def scrub(node)
  return CONTINUE if html5lib_sanitize(node) == CONTINUE
  return CONTINUE if node.name.downcase == 'style' && node.type == Nokogiri::XML::Node::ATTRIBUTE_NODE
  node.remove
  return STOP
end