Remove parent divs only once for each `ul` element

pull/2080/head
Mateus Pereira 1 year ago
parent 94bf820267
commit de4c884f2f

@ -19,8 +19,9 @@ module Docs
node.before(node.children).remove node.before(node.children).remove
end end
css('div > ul').each do |node| parents = css('div > ul').map(&:parent).uniq
node.parent.before(node.parent.children).remove parents.each do |parent|
parent.before(parent.children).remove
end end
css('dl > dd:first-child:last-child > ul:first-child:last-child').each do |node| css('dl > dd:first-child:last-child > ul:first-child:last-child').each do |node|

Loading…
Cancel
Save