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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4d17d702d71c21d0ed367b46cf36bea21e5c0a1
4
- data.tar.gz: 7cf4eb9d2fde090f003a3e0535bf29586bc5265a
3
+ metadata.gz: 6ffcb3340dbf48f0ab35f5d27c63a16b6a1a948c
4
+ data.tar.gz: c33511de9fb08a3e34a59a24b72063eed4f54561
5
5
  SHA512:
6
- metadata.gz: d94370dd5562a7a577af9b7fca87d9ad3e029d159dc750a848301620558ada4c280367c59aef8aa6b63f48f30228a5ebb962e8069376d13e3e1eafe088b4194f
7
- data.tar.gz: ef1b6fbfb31c7608c5f51302dad2bec17170708c0ed1fbb7ad43f780421a62031da4c476b138ea36810b2ac727a4e9fd849e3fa4aaa6967b58df64065831d4dd
6
+ metadata.gz: 6972c831ca48c5c1b796ee4b7a3c85f855651d4fb954c26f822360d37f0d573d29d12f29dc2f26fccd2fa3ef57afd167a7928d5d9633f6ed45ddbd574cdfaa1c
7
+ data.tar.gz: 5fa36e3e019f67f9b3c594be09ebec77a1318a6f087b469392b71891948ab38c9d03cdffeb3bdc269d8b2bb704f12e17babc0a4f68648bdbd4c617050cef53d7
@@ -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} (http://github.com/alexdunae/css_parser)"
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
@@ -1,3 +1,3 @@
1
1
  module CssParser
2
- VERSION = "1.3.6".freeze
2
+ VERSION = "1.3.7".freeze
3
3
  end
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.6
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-01-29 00:00:00.000000000 Z
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.4.3
58
+ rubygems_version: 2.2.2
59
59
  signing_key:
60
60
  specification_version: 4
61
61
  summary: Ruby CSS parser.