lib/bootstrap-email/converters/base.rb in bootstrap-email-1.0.0 vs lib/bootstrap-email/converters/base.rb in bootstrap-email-1.0.1
- old
+ new
@@ -34,10 +34,10 @@
doc.css(css_lookup).sort_by { |n| n.ancestors.size }.reverse!.each(&blk)
end
def add_class(node, class_name)
node['class'] ||= ''
- node['class'] += node['class'].length.zero? ? class_name : " #{class_name}"
+ node['class'] = "#{node['class'].strip} #{class_name}".strip
end
def margin?(node)
margin_top?(node) || margin_bottom?(node)
end