class Phlex::Compiler::Optimizers::BaseOptimizer
def call
def call if standard_element? @node.extend(self.class::StandardElement) elsif void_element? @node.extend(self.class::VoidElement) else false end end
def initialize(node, compiler:)
def initialize(node, compiler:) @node = node @compiler = compiler end
def standard_element?
def standard_element? HTML::STANDARD_ELEMENTS[name] && !@compiler.redefined?(name) end
def void_element?
def void_element? HTML::VOID_ELEMENTS[name] && !@compiler.redefined?(name) end