lib/bootstrap-email/converters/base.rb in bootstrap-email-1.0.2 vs lib/bootstrap-email/converters/base.rb in bootstrap-email-1.1.0
- old
+ new
@@ -34,10 +34,11 @@
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'].strip} #{class_name}".strip
+ # remove double spaces and strip white space from ends
+ node['class'] = "#{node['class']} #{class_name}".gsub(/\s+/, ' ').strip
end
def margin?(node)
margin_top?(node) || margin_bottom?(node)
end