pretty_mailer 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pretty_mailer/html.rb +5 -3
- data/lib/pretty_mailer/version.rb +1 -1
- metadata +1 -1
data/lib/pretty_mailer/html.rb
CHANGED
@@ -50,9 +50,11 @@ module PrettyMailer
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def merge_in_styles tag, specificity
|
53
|
-
tag[specificity]
|
54
|
-
tag[
|
55
|
-
|
53
|
+
if tag[specificity]
|
54
|
+
tag[specificity].split(';').each do |rule|
|
55
|
+
tag['style'] = tag['style'].sub /#{rule.split(':').first.strip}:\s*[a-z0-9]+\s*;/i, "#{rule};"
|
56
|
+
tag['style'] += "#{rule};" unless $~
|
57
|
+
end
|
56
58
|
end
|
57
59
|
end
|
58
60
|
|