This transformer will remove any element that doesn't contain any other nodes or non-whitespace text.
lambda {|env| node = env[:node] return unless node.elem? unless node.children.any?{|c| !c.text? || c.content.strip.length > 0 } node.unlink end }
There was an error while loading. Please reload this page.