mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 18:51:08 +08:00
FIX: Shouldn't overwrite styles in emails that we explicitly set, like category
colors.
This commit is contained in:
@ -18,7 +18,8 @@ module Email
|
|||||||
def add_styles(node, new_styles)
|
def add_styles(node, new_styles)
|
||||||
existing = node['style']
|
existing = node['style']
|
||||||
if existing.present?
|
if existing.present?
|
||||||
node['style'] = "#{existing}; #{new_styles}"
|
# merge styles
|
||||||
|
node['style'] = "#{new_styles}; #{existing}"
|
||||||
else
|
else
|
||||||
node['style'] = new_styles
|
node['style'] = new_styles
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user