A platform for community discussion. Free, open, simple.
Revert "DEV: Remove useless code (#10130)"
Dan Ungureanufe284ffd06f7
diff --git a/lib/oneboxer.rb b/lib/oneboxer.rbindex d045e584188..107e6d0610b 100644--- a/lib/oneboxer.rb+++ b/lib/oneboxer.rb@@ -115,6 +115,13 @@ module Oneboxerendend+ # 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