mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
fix typo
This commit is contained in:
parent
6b5bb9d664
commit
2792c3c80e
@ -326,7 +326,7 @@ class CookedPostProcessor
|
|||||||
# and wrap in a div
|
# and wrap in a div
|
||||||
oneboxed_images.each do |img|
|
oneboxed_images.each do |img|
|
||||||
limit_size!(img)
|
limit_size!(img)
|
||||||
if img.parent["class"].include?("onbox-body") && (width = img["width"].to_i) > 0 && (height = img["height"].to_i) > 0
|
if img.parent["class"].include?("onebox-body") && (width = img["width"].to_i) > 0 && (height = img["height"].to_i) > 0
|
||||||
img.delete('width')
|
img.delete('width')
|
||||||
img.delete('height')
|
img.delete('height')
|
||||||
new_parent = img.add_next_sibling("<div class='aspect-image' style='--aspect-ratio:#{width}/#{height};'/>")
|
new_parent = img.add_next_sibling("<div class='aspect-image' style='--aspect-ratio:#{width}/#{height};'/>")
|
||||||
|
Loading…
Reference in New Issue
Block a user