premailer 1.19.0 → 1.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/premailer/adapter/nokogiri.rb +5 -1
- data/lib/premailer/adapter/nokogiri_fast.rb +11 -3
- data/lib/premailer/adapter/nokogumbo.rb +11 -3
- data/lib/premailer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47eb32064c7ed2912f426d2666ceb0aba0bd7a7f9c235bbc20e86bf961374688
|
4
|
+
data.tar.gz: 84dc0c5fa0331965aaa552f542d05bc2165cc140b98b25826fa7eb4e0470167e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cc088f586ad72db34ed8cf8a44f7b9cdffd4ce1ccbea2009160f228364683f64b7e4891b914c8db4d4c04d3603b792648800912eff6523650c99c5702af17d2
|
7
|
+
data.tar.gz: 023ecd473bd37bf98b7f9e551bda5f7daf494e4f56bad458aa66d01d9e30e7647d514b13c7560aae97f3b06a00c79228a765cc4698a838d1575adc1ef1b673a6
|
@@ -73,7 +73,11 @@ class Premailer
|
|
73
73
|
|
74
74
|
# Perform style folding
|
75
75
|
merged = CssParser.merge(declarations)
|
76
|
-
|
76
|
+
begin
|
77
|
+
merged.expand_shorthand!
|
78
|
+
rescue ArgumentError => e
|
79
|
+
raise e if @options[:rule_set_exceptions]
|
80
|
+
end
|
77
81
|
|
78
82
|
# Duplicate CSS attributes as HTML attributes
|
79
83
|
if Premailer::RELATED_ATTRIBUTES.has_key?(el.name) && @options[:css_to_attributes]
|
@@ -67,13 +67,21 @@ class Premailer
|
|
67
67
|
|
68
68
|
declarations = []
|
69
69
|
style.scan(/\[SPEC\=([\d]+)\[(.[^\]\]]*)\]\]/).each do |declaration|
|
70
|
-
|
71
|
-
|
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
|
-
|
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
|
-
|
65
|
-
|
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
|
-
|
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]
|
data/lib/premailer/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2023-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: css_parser
|