haml_lint 0.22.1 → 0.23.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74bd3e8d2dca346948dee6f5f3518cf8f4427bcf
4
- data.tar.gz: 26f4cf58f23e0a19f480a0d3df8693f28663d709
3
+ metadata.gz: ad4cf83138cb39fd6e8136580212148ae6762be6
4
+ data.tar.gz: 02ac063f7fd5376e2a049f98180e07b27e4a1cf7
5
5
  SHA512:
6
- metadata.gz: 8e9472a1c06a1ae244499ce15226afa4afcc17024dfe7951461194365e5f3ea4733f2c50310d701f676f2666703bc1753495e24a6fda4024d0452d0bd1d14282
7
- data.tar.gz: b29a2894391ca05d84919f22899cf4853297b0048acab726c70217dc4941bd62d49e2e118b5dfd420b9e9cd8fc23d68f65dcd118530ec05613bd8383ced1828d
6
+ metadata.gz: da18d9343dfe0ac6a1dc67bc9e2a4036deed16062f01418b12b806a8988e63075c0fd3ba7b57ad6e63bdfdedfa9125032ea1da948ce2432daee26d0310229923
7
+ data.tar.gz: 2bd7c7492d574d9ad0fc68a9fdad882af6ef78d34ad7a9d9673806792bd8eb9081d48c4b19f31283c4e2f2b9db9a5c28efafd6ba49d1a6e9396212081f7a3d47
@@ -125,7 +125,7 @@ module HamlLint
125
125
  def visit_filter(node) # rubocop:disable Metrics/AbcSize
126
126
  if node.filter_type == 'ruby'
127
127
  node.text.split("\n").each_with_index do |line, index|
128
- add_line(line, node.line + index + 1)
128
+ add_line(line, node.line + index + 1, false)
129
129
  end
130
130
  else
131
131
  add_dummy_puts(node, ":#{node.filter_type}")
@@ -158,8 +158,8 @@ module HamlLint
158
158
  @output_count += 1
159
159
  end
160
160
 
161
- def add_line(code, node_or_line)
162
- return if code.empty?
161
+ def add_line(code, node_or_line, discard_blanks = true)
162
+ return if code.empty? && discard_blanks
163
163
 
164
164
  indent_level = @indent_level
165
165
 
@@ -15,7 +15,7 @@ module HamlLint::Tree
15
15
  # @param line [Integer] the line number of the node
16
16
  # @return [HamlLint::Node]
17
17
  def node_for_line(line)
18
- find(HamlLint::Tree::NullNode) { |node| node.line == line }
18
+ find(-> { HamlLint::Tree::NullNode.new }) { |node| node.line == line }
19
19
  end
20
20
  end
21
21
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module HamlLint
5
- VERSION = '0.22.1'.freeze
5
+ VERSION = '0.23.0'.freeze
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.1
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brigade Engineering
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-08 00:00:00.000000000 Z
12
+ date: 2017-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml