premailer 1.20.0 → 1.21.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 037056bb30a304387a4746310417cbf88c3efa7dc59901989334b6741b1199a7
4
- data.tar.gz: 4e92b08924143d560f84f23ca117c29445a3c038d78c09ded7b5e9c0ba7af065
3
+ metadata.gz: 47eb32064c7ed2912f426d2666ceb0aba0bd7a7f9c235bbc20e86bf961374688
4
+ data.tar.gz: 84dc0c5fa0331965aaa552f542d05bc2165cc140b98b25826fa7eb4e0470167e
5
5
  SHA512:
6
- metadata.gz: 6e628663bb621b3f5ae5a81855af90455c1ed9eeb6cd154df24d8641d831f617a2f6b5314079f05f4bbed475ea6e9cf1ce66cfa05f49a7d9b268494bb3282509
7
- data.tar.gz: 3814f3e413553a54af47c95f21293e58a3a80547983e973deca7360cdaa86e0fe5eccf7abf2c0b67c99d174831ac16c07f384a1fbf5768cd03d7717218f37eae
6
+ metadata.gz: 3cc088f586ad72db34ed8cf8a44f7b9cdffd4ce1ccbea2009160f228364683f64b7e4891b914c8db4d4c04d3603b792648800912eff6523650c99c5702af17d2
7
+ data.tar.gz: 023ecd473bd37bf98b7f9e551bda5f7daf494e4f56bad458aa66d01d9e30e7647d514b13c7560aae97f3b06a00c79228a765cc4698a838d1575adc1ef1b673a6
@@ -67,13 +67,21 @@ class Premailer
67
67
 
68
68
  declarations = []
69
69
  style.scan(/\[SPEC\=([\d]+)\[(.[^\]\]]*)\]\]/).each do |declaration|
70
- rs = CssParser::RuleSet.new(nil, declaration[1].to_s, declaration[0].to_i)
71
- declarations << rs
70
+ begin
71
+ rs = CssParser::RuleSet.new(nil, declaration[1].to_s, declaration[0].to_i)
72
+ declarations << rs
73
+ rescue ArgumentError => e
74
+ raise e if @options[:rule_set_exceptions]
75
+ end
72
76
  end
73
77
 
74
78
  # Perform style folding
75
79
  merged = CssParser.merge(declarations)
76
- merged.expand_shorthand!
80
+ begin
81
+ merged.expand_shorthand!
82
+ rescue ArgumentError => e
83
+ raise e if @options[:rule_set_exceptions]
84
+ end
77
85
 
78
86
  # Duplicate CSS attributes as HTML attributes
79
87
  if Premailer::RELATED_ATTRIBUTES.has_key?(el.name) && @options[:css_to_attributes]
@@ -61,13 +61,21 @@ class Premailer
61
61
 
62
62
  declarations = []
63
63
  style.scan(/\[SPEC\=([\d]+)\[(.[^\]\]]*)\]\]/).each do |declaration|
64
- rs = CssParser::RuleSet.new(nil, declaration[1].to_s, declaration[0].to_i)
65
- declarations << rs
64
+ begin
65
+ rs = CssParser::RuleSet.new(nil, declaration[1].to_s, declaration[0].to_i)
66
+ declarations << rs
67
+ rescue ArgumentError => e
68
+ raise e if @options[:rule_set_exceptions]
69
+ end
66
70
  end
67
71
 
68
72
  # Perform style folding
69
73
  merged = CssParser.merge(declarations)
70
- merged.expand_shorthand!
74
+ begin
75
+ merged.expand_shorthand!
76
+ rescue ArgumentError => e
77
+ raise e if @options[:rule_set_exceptions]
78
+ end
71
79
 
72
80
  # Duplicate CSS attributes as HTML attributes
73
81
  if Premailer::RELATED_ATTRIBUTES.has_key?(el.name) && @options[:css_to_attributes]
@@ -1,4 +1,4 @@
1
1
  class Premailer
2
2
  # Premailer version.
3
- VERSION = '1.20.0'.freeze
3
+ VERSION = '1.21.0'.freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: premailer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.20.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Dunae
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-09 00:00:00.000000000 Z
11
+ date: 2023-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: css_parser