css_parser 1.3.6 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/css_parser/parser.rb +3 -3
- data/lib/css_parser/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ffcb3340dbf48f0ab35f5d27c63a16b6a1a948c
|
4
|
+
data.tar.gz: c33511de9fb08a3e34a59a24b72063eed4f54561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6972c831ca48c5c1b796ee4b7a3c85f855651d4fb954c26f822360d37f0d573d29d12f29dc2f26fccd2fa3ef57afd167a7928d5d9633f6ed45ddbd574cdfaa1c
|
7
|
+
data.tar.gz: 5fa36e3e019f67f9b3c594be09ebec77a1318a6f087b469392b71891948ab38c9d03cdffeb3bdc269d8b2bb704f12e17babc0a4f68648bdbd4c617050cef53d7
|
data/lib/css_parser/parser.rb
CHANGED
@@ -14,7 +14,7 @@ module CssParser
|
|
14
14
|
# [<tt>import</tt>] Follow <tt>@import</tt> rules. Boolean, default is <tt>true</tt>.
|
15
15
|
# [<tt>io_exceptions</tt>] Throw an exception if a link can not be found. Boolean, default is <tt>true</tt>.
|
16
16
|
class Parser
|
17
|
-
USER_AGENT = "Ruby CSS Parser/#{CssParser::VERSION} (
|
17
|
+
USER_AGENT = "Ruby CSS Parser/#{CssParser::VERSION} (https://github.com/premailer/css_parser)"
|
18
18
|
|
19
19
|
STRIP_CSS_COMMENTS_RX = /\/\*.*?\*\//m
|
20
20
|
STRIP_HTML_COMMENTS_RX = /\<\!\-\-|\-\-\>/m
|
@@ -263,7 +263,7 @@ module CssParser
|
|
263
263
|
current_media_query = ''
|
264
264
|
current_declarations = ''
|
265
265
|
|
266
|
-
block.scan(/([\\]?[{}\s"]|(.[^\s"{}\\]*))/).each do |matches|
|
266
|
+
block.scan(/(([\\]{2,})|([\\]?[{}\s"])|(.[^\s"{}\\]*))/).each do |matches|
|
267
267
|
token = matches[0]
|
268
268
|
|
269
269
|
if token =~ /\A"/ # found un-escaped double quote
|
@@ -277,7 +277,7 @@ module CssParser
|
|
277
277
|
next
|
278
278
|
end
|
279
279
|
|
280
|
-
if token =~ /\{/
|
280
|
+
if token =~ /\{/ and not in_string
|
281
281
|
in_declarations += 1
|
282
282
|
next
|
283
283
|
end
|
data/lib/css_parser/version.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.3.
|
4
|
+
version: 1.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Dunae
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
57
|
rubyforge_project:
|
58
|
-
rubygems_version: 2.
|
58
|
+
rubygems_version: 2.2.2
|
59
59
|
signing_key:
|
60
60
|
specification_version: 4
|
61
61
|
summary: Ruby CSS parser.
|