suspiciouss 0.1.3 → 0.1.4

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: 2cec60795a5d43b153226bdbd7a07f145bf9e943
4
- data.tar.gz: 04c7f1e38dd8befc36c7bd8df2e672f8e6452977
3
+ metadata.gz: 567136a373e6fc737a3440dcc0bc3573be561862
4
+ data.tar.gz: 9c2eb9b277b01fe03a902cd0365a782f4efeb18c
5
5
  SHA512:
6
- metadata.gz: d38bb88b4b85053b01bd940e2882fe7e6085600c399c1a32ab988fb415337d712a05cdc1de760da7fe50363e061f8b2baf477e7d8c5f7a2e2067c2c525803b81
7
- data.tar.gz: 7f34108c06f126c456f267adb7a67426eb84e3690846ffcf1b5610e80a1736ddfce5961ad5ea2970c7431b782a3bda19a121b911c4922e3f55e9026089aea189
6
+ metadata.gz: 4311e6dbb1b38a071df9d29382bab7939e3b21a228ba6d998b1821a074a9f29f2bc1428f20495bd75923612f7d7aed09905c5eae0f1734479e22d6b1c54e72f6
7
+ data.tar.gz: 34a1c35da29158673df0e1e8bb87e18efd4125e351482952e50479f3ac656f2b16cb63acc30e08c963837f63a1c4cfd4c732da8f52a06bb4b3c8882f96d39fd7
@@ -59,7 +59,7 @@ module Suspiciouss
59
59
  # Parses a line with each of the known suggestions and adds the result
60
60
  # to the final output.
61
61
  def parse(full_line)
62
- line = strip_diff_syntax full_line
62
+ line = strip_diff_syntax(remove_line_comments(full_line))
63
63
 
64
64
  return unless full_line =~ /^\+ /
65
65
 
@@ -80,6 +80,11 @@ module Suspiciouss
80
80
  line[2..-1]
81
81
  end
82
82
 
83
+ # Returns a line without comments
84
+ def remove_line_comments(line)
85
+ line.gsub /\/\/.*$/, ''
86
+ end
87
+
83
88
  def known_suggestions
84
89
  @known_suggestions ||= suggestions_to_use.map do |suggestion_class|
85
90
  SUGGESTIONS.const_get(suggestion_class).new
@@ -1,3 +1,3 @@
1
1
  module Suspiciouss
2
- VERSION = '0.1.3'
2
+ VERSION = '0.1.4'
3
3
  end
@@ -11,6 +11,7 @@
11
11
  +++ b/path/to/file.sass
12
12
 
13
13
 
14
+ + // This comment is ignored even if it has a #hash
14
15
  + #pleaseDont
15
16
  + color: $black
16
17
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suspiciouss
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Cruz Horts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-25 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec