html-proofer 3.18.1 → 3.18.2

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: 60d8c8a9a9d38a05b628f3b6a852e27081ee85b7671a41bf51457f4d5f05440c
4
- data.tar.gz: 8fb0e24b312fdae8eb37c98de0d6498035fd20e46dd71456842916d59daf642b
3
+ metadata.gz: 852efb42767ef8589aa2f469f06c807ab287d78da04043e5a57e4d4a7f8bf6dd
4
+ data.tar.gz: 065406c8f1a7978d025224dc4ef53137e698eaeec8f097c1375620c8d6e0c5ba
5
5
  SHA512:
6
- metadata.gz: 93dc24aec3ae4e94a4352751a41237aedf147493364cb8b40de7c25d8b9e2780969f8159d95f176fef539fe0560b3c28ae229432efdccf5dfeb878d7b765841f
7
- data.tar.gz: caefd93da740afefb6f78c1c1e767bfaddeba2f1b7de248ea426790283a1d97785f75b33123c89d488ba36cdd3d850185400c011830a9f4e5eecd45b52ba6a2a
6
+ metadata.gz: c5aabdd3e5087dd1282b4428b7105e62216b22510c1a73a9f80f1e6b2ba18906217c7aaa974b245644de2b325bef8fd3e05c61c528302fb59ce5a353da0c1d04
7
+ data.tar.gz: 7155e2eed2e31173ad7e8efe4d7ce31b2cf18fa403b560f03428e3ef8ff8f9c60654f9e1ee6a4470ff65f609fdaeeb107e0236c85610212e90b7a9535a650522
@@ -54,7 +54,7 @@ class LinkCheck < ::HTMLProofer::Check
54
54
  add_to_external_urls(@link.href || @link.src)
55
55
  next
56
56
  elsif @link.internal?
57
- if @link.exists?
57
+ if @link.exists? || @link.hash
58
58
  add_to_internal_urls(@link.href, InternalLink.new(@link, @path, line, content))
59
59
  else
60
60
  add_issue("internally linking to #{@link.href}, which does not exist", line: line, content: content)
@@ -72,10 +72,10 @@ class LinkCheck < ::HTMLProofer::Check
72
72
  return false
73
73
  end
74
74
 
75
- # verify the target hash
76
- return handle_hash(link, path, line, content) if link.hash
75
+ return true unless link.hash
77
76
 
78
- true
77
+ # verify the target hash
78
+ handle_hash(link, path, line, content)
79
79
  end
80
80
 
81
81
  def check_schemes(link, line, content)
@@ -157,11 +157,12 @@ module HTMLProofer
157
157
  @cache.write
158
158
  else
159
159
  @internal_urls.values.flatten.each do |internal_url|
160
- @internal_link_checks.check_internal_link(internal_url.link, internal_url.path, internal_url.line, internal_url.content)
160
+ result = @internal_link_checks.check_internal_link(internal_url.link, internal_url.path, internal_url.line, internal_url.content)
161
+ next if result
162
+
163
+ @failures.concat(@internal_link_checks.issues) unless @internal_link_checks.issues.length.zero?
161
164
  end
162
165
  end
163
-
164
- @failures.concat(@internal_link_checks.issues) unless @internal_urls.length.zero?
165
166
  end
166
167
 
167
168
  def files
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTMLProofer
4
- VERSION = '3.18.1'
4
+ VERSION = '3.18.2'
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: 3.18.1
4
+ version: 3.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-16 00:00:00.000000000 Z
11
+ date: 2020-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable