mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 13:06:56 +08:00
DEV: Remove useless code (#10130)
protection is not needed and can easily be bypassed with empty divs anyway.
This commit is contained in:
@ -115,13 +115,6 @@ module Oneboxer
|
|||||||
end
|
end
|
||||||
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)
|
Result.new(doc, changed)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user