History

Merge pull request #2080 from mateusdeap/main

Remove parent divs only once for each `ul` element

Simon Legner committed 2 years ago

Commit 6c81f972 parents abcc1fe de4c8841 file · +3 −2Browse files

Unified · Split

lib/docs/filters/cppref/clean_html.rb+3−2
@@ -19,8 +19,9 @@ module Docs · 18 unmodified lines
19 node.before(node.children).remove19 node.before(node.children).remove
20 end20 end
21 21
22 css('div > ul').each do |node|22 parents = css('div > ul').map(&:parent).uniq
23 node.parent.before(node.parent.children).remove23 parents.each do |parent|
24 parent.before(parent.children).remove
24 end25 end
25 26
26 css('dl > dd:first-child:last-child > ul:first-child:last-child').each do |node|27 css('dl > dd:first-child:last-child > ul:first-child:last-child').each do |node|