css_parser 1.19.0 → 1.20.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/css_parser/parser.rb +1 -6
- data/lib/css_parser/rule_set.rb +2 -1
- data/lib/css_parser/version.rb +1 -1
- data/lib/css_parser.rb +0 -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: 7685aa4f55ebd1d9abde202f1d4f03e9215e494ae01daf44713286311e339e7f
|
4
|
+
data.tar.gz: 2d60924c9ada315c9bf8c4e5ce8186b27df4f5a6e5cddef4287f4df190c45a63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65bce8402032a1b8f159e1133eb1cc76f7ca104113d3e8191fd7eab2eda6796409f50a6208e58e867cd057b8128bf584dcf7b59de7f9e829512ec711fbed4322
|
7
|
+
data.tar.gz: 5dcc28bc5cebe61327e3d492502d849d59c438d7704d4e355f8b5c845b2d02897972df53a5b842bcb5da19baf92854e9014fdf9a100519a3c9c3d8cc1912f17a
|
data/lib/css_parser/parser.rb
CHANGED
@@ -677,12 +677,7 @@ module CssParser
|
|
677
677
|
end
|
678
678
|
|
679
679
|
if charset
|
680
|
-
|
681
|
-
src.encode!('UTF-8', charset)
|
682
|
-
else
|
683
|
-
ic = Iconv.new('UTF-8//IGNORE', charset)
|
684
|
-
src = ic.iconv(src)
|
685
|
-
end
|
680
|
+
src.encode!('UTF-8', charset)
|
686
681
|
end
|
687
682
|
rescue
|
688
683
|
@redirect_count = nil
|
data/lib/css_parser/rule_set.rb
CHANGED
@@ -31,6 +31,7 @@ module CssParser
|
|
31
31
|
SEMICOLON = ';'.freeze
|
32
32
|
LPAREN = '('.freeze
|
33
33
|
RPAREN = ')'.freeze
|
34
|
+
IMPORTANT = '!important'.freeze
|
34
35
|
class Declarations
|
35
36
|
class Value
|
36
37
|
attr_reader :value
|
@@ -667,7 +668,7 @@ module CssParser
|
|
667
668
|
value = decs[(colon + 1)..]
|
668
669
|
property.strip!
|
669
670
|
value.strip!
|
670
|
-
next if property.empty? || value.empty?
|
671
|
+
next if property.empty? || value.empty? || value.casecmp?(IMPORTANT)
|
671
672
|
|
672
673
|
add_declaration!(property, value)
|
673
674
|
continuation = nil
|
data/lib/css_parser/version.rb
CHANGED
data/lib/css_parser.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: css_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.20.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: 2024-
|
11
|
+
date: 2024-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|