html-proofer 5.0.6 → 5.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/html_proofer/check/links.rb +2 -1
- data/lib/html_proofer/log.rb +2 -2
- data/lib/html_proofer/reporter.rb +2 -2
- data/lib/html_proofer/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50339be276ce339102f54b1cd0cdceba4a56c47fde8f94214acdba332f3b2ab5
|
4
|
+
data.tar.gz: 1a997bd96869843f419243dcd792cd26b0fa5ea0bae4d388e9c149ec6dd81a61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7ca22f1b1229ea040fa85cfa69c76911d25c8284e1aa0eabb5d4ffecdb6409c6e2af9264c0473b0d687c44986682807cf4f5199aa40c9b1d23ffeb2bd1d4385
|
7
|
+
data.tar.gz: 95ae424ce230d0293280035defb5a43de16632f36f3d4f1abe1df91eba9e2e99aacdaa66e4759aefab124dd68c97d5dbd35cb376ec2374b9dbf00069a5aab2e5
|
@@ -96,7 +96,8 @@ module HTMLProofer
|
|
96
96
|
"#{@link.url.raw_attribute} contains no email address",
|
97
97
|
element: @link,
|
98
98
|
) unless ignore_empty_mailto?
|
99
|
-
|
99
|
+
# eg., if any do not match a valid URL
|
100
|
+
elsif @link.url.path.split(",").any? { |email| !/#{URI::MailTo::EMAIL_REGEXP}/o.match?(email) }
|
100
101
|
add_failure(
|
101
102
|
"#{@link.url.raw_attribute} contains an invalid email address",
|
102
103
|
element: @link,
|
data/lib/html_proofer/log.rb
CHANGED
@@ -12,7 +12,7 @@ module HTMLProofer
|
|
12
12
|
|
13
13
|
def initialize(log_level)
|
14
14
|
@logger = Yell.new(
|
15
|
-
format: false,
|
15
|
+
format: false,
|
16
16
|
name: "HTMLProofer", \
|
17
17
|
level: "gte.#{log_level}",
|
18
18
|
) do |l|
|
@@ -41,7 +41,7 @@ module HTMLProofer
|
|
41
41
|
:red
|
42
42
|
end
|
43
43
|
|
44
|
-
if (STDOUT_LEVELS.include?(level) && $stdout.isatty) ||
|
44
|
+
if (STDOUT_LEVELS.include?(level) && $stdout.isatty) ||
|
45
45
|
(STDERR_LEVELS.include?(level) && $stderr.isatty)
|
46
46
|
Rainbow(message).send(color)
|
47
47
|
else
|
@@ -11,8 +11,8 @@ module HTMLProofer
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def failures=(failures)
|
14
|
-
@failures = failures.group_by(&:check_name)
|
15
|
-
.transform_values { |issues| issues.sort_by { |issue| [issue.path, issue.line] } }
|
14
|
+
@failures = failures.group_by(&:check_name)
|
15
|
+
.transform_values { |issues| issues.sort_by { |issue| [issue.path, issue.line] } }
|
16
16
|
.sort
|
17
17
|
end
|
18
18
|
|
data/lib/html_proofer/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html-proofer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|