factbook-readers/lib/factbook-readers/convert.rb
#####
# sanitize (html with nokogire) helpers
sanitize (html with nokogire) helpers
sanitize ( html with nokogire ) helpers
def unwrap_recurse( node, tags: )   
  node.elements.each do |child|
    unwrap_recurse( child, tags: tags )
  end
  node.replace( node.inner_html )   if tags.include?( node.name )   
end
def unwrap_recurse ( node , tags : ) node . elements . each do | child | unwrap_recurse ( child , tags : tags ) end node . replace ( node . inner_html ) if tags . include? ( node . name ) end
sanitize (html with nokogire) helpers
sanitize ( html with nokogire ) helpers
## default to unwrap ['span'] tag only for now # note: depth first so we don't accidentally modify a collection while # we're iterating through it # replace this element's children with it's grandchildren # assuming it meets all the criteria ## check: always downcase needed - why? why not?
node
<not_specific>
tags
<not_specific>