scss_beautifier 0.1.13 → 0.1.14

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: a3462d949ac3df3ae6bf1ce977e0215a6098c9a5
4
- data.tar.gz: d6485a222ed3ab7d596e538b06b7fa6139a8805d
3
+ metadata.gz: 513cc2290d9718193bda78601fb27097014ebba4
4
+ data.tar.gz: 5618e704c31dbae88320e9d227d83432679cc0ff
5
5
  SHA512:
6
- metadata.gz: 8d2931876ab0c33d0d10cf0d96d3718e14f5be3a8e8ab3c0e681ff6a400adf1b73c2ab988fd1fac075d24b34a5f21d27aaf8a3872ddad41e024ec5eae00beaf9
7
- data.tar.gz: 5dbaa7cdd781813370691deef02b66513ca61bce3224b09861efe398630eb97d5a4805f72780afcd135e810ddb7aab9b08d7376938509590488254cd74137420
6
+ metadata.gz: 143a2a3afa95a3a48bd7aa3c948ab8750aea1ae30ba117ff594e60df09c020f0b4f08fb70d6bd2ce73aeaa8dd93cd717e777f52b92b75c9c2f8bccf1816a4bff
7
+ data.tar.gz: c88fa0adcb75249b515b3802d0687500c36aecd1967715721ded3173d22c340ff68a1cd2e2a543f4125ce7f0510a70bfa615722e08346245504d0315663d466e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scss_beautifier (0.1.13)
4
+ scss_beautifier (0.1.14)
5
5
  sass (~> 3.4)
6
6
 
7
7
  GEM
@@ -7,9 +7,11 @@ class SCSSBeautifier::Formatters::PropertySortOrder < SCSSBeautifier::Formatters
7
7
  def order_children(node)
8
8
  prop_nodes = []
9
9
  comment_array = []
10
+ seen_comments = []
10
11
  node.children.each do |child|
11
12
  hash_key = child.class.node_name.to_s
12
13
  if hash_key == 'comment'
14
+ seen_comments << child
13
15
  comment_array << child
14
16
  elsif hash_key == 'prop'
15
17
  prop_nodes << comment_array.push(child)
@@ -23,7 +25,7 @@ class SCSSBeautifier::Formatters::PropertySortOrder < SCSSBeautifier::Formatters
23
25
  hash_key = child.class.node_name.to_s
24
26
  if hash_key == 'prop'
25
27
  children.concat(prop_nodes.shift)
26
- elsif hash_key != 'comment'
28
+ elsif hash_key != 'comment' || seen_comments.include?(child)
27
29
  children << child
28
30
  end
29
31
  end
@@ -1,3 +1,3 @@
1
1
  module SCSSBeautifier
2
- VERSION = "0.1.13"
2
+ VERSION = "0.1.14"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scss_beautifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Tse