haml_lint 0.18.0 → 0.18.1

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: cf21b69028eb0a691d60eaad90bdab27b7a52829
4
- data.tar.gz: 58a24369859f1384180c1e928b672417abebac94
3
+ metadata.gz: b362b9d5e1e225ffb9f878ae933a9446edaf4ed8
4
+ data.tar.gz: bd841a48d2e152668650420e95cb4f4ca6a65b8c
5
5
  SHA512:
6
- metadata.gz: cf10d59ef201f50b68daa5328fef0df54f2cd455e1c82779355f13bffff833dc3b35770719785460c3cf10d7b517e16ec4d6b61ffb23df560b59597666788ea3
7
- data.tar.gz: ad94abfd0a1c776e86ffdf3a1ac271323ab519a5a62e38adc01ad22632b32f0f0a0c6548d74bcb2795c72ac47556ec316a128beb39fb3e18286f42ae0c50ca4a
6
+ metadata.gz: 212c2c30d86a0cc25cc7621c011553015bde42e2f93d120e6bd456be5b70fdcef728a2009aa20bd2835c04a080ebba83d7da3415ef4ff8a5f88128bb00ebc52a
7
+ data.tar.gz: 15b581bdc90f6a71fe63a2b7117d5cab05c4b683e34fadad3d831f1d20bd03ae059b34b17b5b61885872f6bd8f537e5d5d63bcf5cf17f4f9d1b243490a955c4c
@@ -109,7 +109,13 @@ module HamlLint
109
109
  end
110
110
 
111
111
  def visit_haml_comment(node)
112
- add_line("##{node.text}", node)
112
+ # We want to preseve leading whitespace if it exists, but include leading
113
+ # whitespace if it doesn't exist so that RuboCop's LeadingCommentSpace
114
+ # doesn't complain
115
+ comment = node.text
116
+ .gsub(/\n(\S)/, "\n# \\1")
117
+ .gsub(/\n(\s)/, "\n#\\1")
118
+ add_line("##{comment}", node)
113
119
  end
114
120
 
115
121
  def visit_silent_script(node, &block)
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module HamlLint
5
- VERSION = '0.18.0'.freeze
5
+ VERSION = '0.18.1'.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.18.0
4
+ version: 0.18.1
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: 2016-07-17 00:00:00.000000000 Z
12
+ date: 2016-07-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml