awesomemailer 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/awesomemailer.gemspec +1 -1
- data/lib/awesome_mailer/renderer.rb +5 -2
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
data/awesomemailer.gemspec
CHANGED
@@ -26,11 +26,14 @@ module AwesomeMailer
|
|
26
26
|
|
27
27
|
private
|
28
28
|
def apply_styles_to_body!(selector, properties)
|
29
|
-
rewrite_relative_urls(properties) if host
|
30
29
|
search_selector = selector =~ /^body/ ? selector : "body #{selector}"
|
31
|
-
document.search(search_selector)
|
30
|
+
elements = document.search(search_selector)
|
31
|
+
rewrite_relative_urls(properties) if host
|
32
|
+
elements.each do |element|
|
32
33
|
element['style'] = [element['style'], properties].flatten.compact.join('; ')
|
33
34
|
end
|
35
|
+
rescue Nokogiri::CSS::SyntaxError # Complex CSS? Just dump it somewhere
|
36
|
+
apply_styles_to_head!(selector, properties)
|
34
37
|
end
|
35
38
|
|
36
39
|
def apply_styles_to_head!(selector, properties, indent = 0)
|