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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96326ab8326657b7f11d5cc1baddfb82e8dcb115e4a2aa576161642ebbe9afe4
4
- data.tar.gz: ce761e92fcfe407fa4711558b60a6453545cdba6b7b97f8be8da22109e451256
3
+ metadata.gz: 50339be276ce339102f54b1cd0cdceba4a56c47fde8f94214acdba332f3b2ab5
4
+ data.tar.gz: 1a997bd96869843f419243dcd792cd26b0fa5ea0bae4d388e9c149ec6dd81a61
5
5
  SHA512:
6
- metadata.gz: 2c66bf1334c00dacb13d2789f119cf5e0f2da723afd59e82948589e26e54e6e12bb5778b23cc758fe81a9d99d112c501e607eacc2247a3258bda60904d7ec65d
7
- data.tar.gz: c81c4482233aa8fe86721de10332dc9f42ed03c4103ff0c77144a6fffc0f715e7964be2a0b935a04fbc586b4f78a2b445eebb9df5912076e910ab387add299cd
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
- elsif !/#{URI::MailTo::EMAIL_REGEXP}/o.match?(@link.url.path)
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,
@@ -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
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTMLProofer
4
- VERSION = "5.0.6"
4
+ VERSION = "5.0.7"
5
5
  end
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.6
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-03-15 00:00:00.000000000 Z
11
+ date: 2023-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable