While attempting use Premailer to inline CSS for emails originating from Amazon, we started seeing errors when expanding font shorthands that have spaces after the forward slash - e.g font-size/ line-height:
NoMethodError: undefined method `strip' for nil:NilClass
/bundle/gems/css_parser-1.5.0/lib/css_parser/rule_set.rb:99:in `block in each_declaration'
/bundle/gems/css_parser-1.5.0/lib/css_parser/rule_set.rb:97:in `each'
/bundle/gems/css_parser-1.5.0/lib/css_parser/rule_set.rb:97:in `each_declaration'
/bundle/gems/css_parser-1.5.0/lib/css_parser.rb:81:in `block in merge'
/bundle/gems/css_parser-1.5.0/lib/css_parser.rb:69:in `each'
/bundle/gems/css_parser-1.5.0/lib/css_parser.rb:69:in `merge'
...
[ ] Should a space/spaces be allowed before the /?
[ ] Should some nil safety be added to line 446/447 in rule_set.rb to address TypeError: no implicit conversion of nil into String? (this fix _should address this...)
Description
While attempting use Premailer to inline CSS for emails originating from Amazon, we started seeing errors when expanding font shorthands that have spaces after the forward slash - e.g
font-size/ line-height
:An example of the email body particulars:
What it renders like in a browser:
Tasks
/
?TypeError: no implicit conversion of nil into String
? (this fix _should address this...)@grosser, thoughts?