mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:38:17 +08:00
Lift all oneboxes out of <p>
tags.
This commit is contained in:
parent
2e0832fa71
commit
fc20332c0f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user