DEV: Remove useless code (#10130)

DEV: Remove useless code (#10130)

protection is not needed and can easily be bypassed with empty divs anyway.

diff --git a/lib/oneboxer.rb b/lib/oneboxer.rb
index 107e6d0..d045e58 100644
--- a/lib/oneboxer.rb
+++ b/lib/oneboxer.rb
@@ -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
 

GitHub sha: c299d022

1 Like

This commit appears in #10130 which was approved by eviltrout. It was merged by SamSaffron.