DEV: Remove useless code (#10130)

protection is not needed and can easily be bypassed with empty divs anyway.
This commit is contained in:
Dan Ungureanu 2020-06-29 10:49:30 +03:00 committed by GitHub
parent fa8bb5f464
commit c299d02287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 7 deletions

View File

@ -115,13 +115,6 @@ module Oneboxer
end
end
# strip empty <p> elements
doc.css("p").each do |p|
if p.children.empty? && doc.children.count > 1
p.remove
end
end
Result.new(doc, changed)
end