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 +4 -4
- data/lib/haml_lint/ruby_extractor.rb +3 -3
- data/lib/haml_lint/tree/root_node.rb +1 -1
- data/lib/haml_lint/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad4cf83138cb39fd6e8136580212148ae6762be6
|
4
|
+
data.tar.gz: 02ac063f7fd5376e2a049f98180e07b27e4a1cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/haml_lint/version.rb
CHANGED
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.
|
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-
|
12
|
+
date: 2017-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: haml
|