Lift all oneboxes out of <p> tags.

This commit is contained in:
Robin Ward 2014-07-04 16:09:51 -04:00
parent 2e0832fa71
commit fc20332c0f

View File

@ -90,8 +90,7 @@ module Oneboxer
# special logic to strip empty p elements
if element.parent &&
element.parent.node_name.downcase == "p" &&
element.parent.children.count == 1 &&
parsed_onebox.children.first.name.downcase == "div"
element.parent.children.count == 1
element = element.parent
end
changed = true