haml_lint 0.39.0 → 0.40.0

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: b9b35d2560a3a069ba7c72c9d0729dd3123248fdf3f4d9767eb10cac347141c1
4
- data.tar.gz: 54d62f683b3b7e5a72572f8de7c7ffe45cc21e6f1de597f1cedd085c7b175154
3
+ metadata.gz: 8ef9ca7cc6bbd3b5f9663a2bda75669062b25efeb53af9e32cf152fd7f5aee6c
4
+ data.tar.gz: 35e34d39d55e13910ec90f9ee7ece9a4baa2d6bc44f2f6962b230f6387519174
5
5
  SHA512:
6
- metadata.gz: 4c28755b6e79b1fc038f89ec6e90f18568c9c55bec73909dc526f331e484d1273cf5d6d037ca44970eeafcde15c7a93df4990ea157a1ffc7f42ff902a72848fc
7
- data.tar.gz: e6ddfe5ff416b4cb04d47ecb80a212a97979f52dd2d82f449e65548b6bbab588eb04bafb01c4e61b757ebe168db47ab4d77b9bbdd9b70d1b439f02dae273c82c
6
+ metadata.gz: 376df9f9c0de3c0949bd2187bb1ba9f3bc5e381644a93c827ca085125ac2922f59f98d048d8bf548b379ebe5def5180f9b182628030f4e66454f3edf71478f9f
7
+ data.tar.gz: fa1a9ad202224e1059dd7802b1aea08db8b9d11570feca891a31650dc3b10f0b991b2585ad27faa4425bc2165a2b23e799075c944250a43568e1d17c7f83f8b1
@@ -9,15 +9,15 @@ module HamlLint
9
9
  STYLE = {
10
10
  'no_space' => {
11
11
  start_regex: /\A\{[^ ]/,
12
- end_regex: /[^ ]\}\z/,
12
+ end_regex: /(?:^\s*\}|[^ ]\})\z/,
13
13
  start_message: 'Hash attribute should start with no space after the opening brace',
14
- end_message: 'Hash attribute should end with no space before the closing brace'
14
+ end_message: 'Hash attribute should end with no space before the closing brace or be on its own line'
15
15
  },
16
16
  'space' => {
17
- start_regex: /\A\{ [^ ]/,
18
- end_regex: /[^ ] \}\z/,
17
+ start_regex: /\A\{(?: [^ ]|$)/,
18
+ end_regex: /(?:^\s*\}|[^ ] \})\z/,
19
19
  start_message: 'Hash attribute should start with one space after the opening brace',
20
- end_message: 'Hash attribute should end with one space before the closing brace'
20
+ end_message: 'Hash attribute should end with one space before the closing brace or be on its own line'
21
21
  }
22
22
  }.freeze
23
23
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Defines the gem version.
4
4
  module HamlLint
5
- VERSION = '0.39.0'
5
+ VERSION = '0.40.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.39.0
4
+ version: 0.40.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane da Silva
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-26 00:00:00.000000000 Z
11
+ date: 2022-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: haml