rubocop-slim 0.2.3 → 0.2.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
  SHA256:
3
- metadata.gz: 67f8c2766d006c2a0bfeb0545447f9341835f513586607013223ee8a230cb758
4
- data.tar.gz: 5179018956184557d263b8da88636f49c48cfda214a79c46176eb3a03d77e9c5
3
+ metadata.gz: ab04cbc6e4180405af2c468a50832c0ba3be2db459d581ce1d84d1d9131ff0fe
4
+ data.tar.gz: efa8261463d5609a1b363216a83fb28aa57234f0eaf8fab30f68acf89f16924b
5
5
  SHA512:
6
- metadata.gz: 63f33eb8d47b284ff60dac4965b57e5b514e6f5570a26a3b2c3f9e79dfe793ac63ff8d40b4749894a5d9324c06ad686805ddcd40bd1c7e190da590df345b8588
7
- data.tar.gz: 41d5cd785d46525a1027db215a4840e627f8b03ec64f64c61cc21c2b298fed8357c10ff507d23b9748f691124e72d6eaa5b34702e3d7bbbbc493b921fa227b94
6
+ metadata.gz: 2c76de6b75c20a5ce1cbf8eda415c04312ece5f108c9849fd470e2a5850ac5d9af66760f862266cf21a3b4538d71aa91dbb47e308ce6a59bceca03f4312dc2c8
7
+ data.tar.gz: 70b4253f59266644dbf3bfaf93a40f00347f105a168d3d051364509a0b68dc2377e96ac37a89a8f6fe9f12dbe6900b0982eed60b18599ff0efa8700b92da60ce
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rubocop-slim (0.2.3)
4
+ rubocop-slim (0.2.4)
5
5
  rubocop (~> 1.45)
6
6
  slimi (~> 0.7)
7
7
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module RuboCop
4
4
  module Slim
5
- VERSION = '0.2.3'
5
+ VERSION = '0.2.4'
6
6
  end
7
7
  end
@@ -31,10 +31,16 @@ module RuboCop
31
31
  if match_data
32
32
  offset = match_data[0].length
33
33
  condition = @ruby_clip.code[offset..].sub(/[ \t]then(?:[ \t].*)?/, '')
34
- parse("[#{condition}]").children.map do |child|
34
+ parse(
35
+ <<~RUBY
36
+ [
37
+ #{condition}
38
+ ]
39
+ RUBY
40
+ ).children.map do |child|
35
41
  RubyClip.new(
36
42
  code: child.location.expression.source,
37
- offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 1
43
+ offset: @ruby_clip.offset + offset + child.location.expression.begin_pos - 4
38
44
  )
39
45
  end
40
46
  else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-slim
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryo Nakamura