erblint-github 0.0.8 → 0.0.9
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd39a72bcefe35b0231242045b4aca7cfdf6468b795d2703528655039b9e7be
|
4
|
+
data.tar.gz: 4331758cf201fe621f5510554766a6d300f46b43ef36d272e82f53d2ffaf420d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea54a4d64005d7be039a3f9ed620447ca673db7113e821f303cce4c35da74835c6f124afa84f3b7e8eb35e2adb278394aef1f6326a10f73ebfb3a9a342c956a1
|
7
|
+
data.tar.gz: 942f3526203855f2a58c37f54b5d2775cc0de910a0adf057889dba2c4e60a1553276b640c7ba6c8fd6ed91d3b3af597ab86c0aa49e84f49ed47005feafcec59a
|
@@ -112,12 +112,17 @@ module ERBLint
|
|
112
112
|
|
113
113
|
private
|
114
114
|
|
115
|
+
# Downcase and strip punctuation and extra whitespaces.
|
116
|
+
def stripped_text(text)
|
117
|
+
text.downcase.gsub(/\W+/, " ").strip
|
118
|
+
end
|
119
|
+
|
115
120
|
def banned_text?(text)
|
116
|
-
BANNED_GENERIC_TEXT.map(&:downcase).include?(text
|
121
|
+
BANNED_GENERIC_TEXT.map(&:downcase).include?(stripped_text(text))
|
117
122
|
end
|
118
123
|
|
119
124
|
def valid_accessible_name?(aria_label, text)
|
120
|
-
aria_label.
|
125
|
+
stripped_text(aria_label).include?(stripped_text(text))
|
121
126
|
end
|
122
127
|
|
123
128
|
def extract_ruby_node(source)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: erblint-github
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GitHub Open Source
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erb_lint
|