html-proofer 3.14.0 → 3.14.1

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: cf06ea39b2c106240c1d6c10261b50bab110fa5620451690970c8226bd0022cb
4
- data.tar.gz: 70446e5bf8162760c6583f53917c3774ad165d29af0bd01ae600c6069d09360b
3
+ metadata.gz: e652993805b4e62434a27fd09f20936c71d1abfa2588e1ea991ed00d5174cfa4
4
+ data.tar.gz: 1e4feee6f61dbadd8ed0d91e25950c0f643e3f29ee1cf881fa9bde6f37854901
5
5
  SHA512:
6
- metadata.gz: ab6ef8adc5d80cd409f1cd6248ce7b969f69c219b6878e8d4614852dfc8211430db2fd6863c5e5b03a42326dc315e5538d939f506f95a774b1f48df6a9c95b06
7
- data.tar.gz: 603ff3aad5001b0484a753dda3c9b72fa6bac15e94d767f8cb8aaf009810c21b2e7cf5ee039d9261b05c0bb888cad85aa9da769ff0fc13489234bb841c3ee858
6
+ metadata.gz: a6955c42ec89662b66b83422555e0d43c837f2d11f9e67bf85f587b2301d7c24f6f0275e16b31c904ee9da2999dde8583994d532f5be7a2b2f838dda2dab6e1b
7
+ data.tar.gz: d261d16b8fcd86ceeac73eac6594b3c30a589015b5400ad785e879ce8b77ad7793fd85609063b6b57ffb08333ac07e1982a1b7cae449ab3e7cc5e0f1c36d6e5d
@@ -150,7 +150,7 @@ module HTMLProofer
150
150
  def relative_link?
151
151
  return false if remote?
152
152
 
153
- hash_link || param_link || url.start_with?('.') || url =~ /^\w/
153
+ hash_link || param_link || url.start_with?('.') || url =~ /^\S/
154
154
  end
155
155
 
156
156
  def link_points_to_same_page?
@@ -234,12 +234,14 @@ module HTMLProofer
234
234
  end
235
235
 
236
236
  def html
237
- # If link is on the same page, then URL is on the current page so can use the same HTML as for current page
237
+ # If link is on the same page, then URL is on the current page. use the same HTML as for current page
238
238
  if link_points_to_same_page?
239
239
  @html
240
- elsif relative_link?
240
+ elsif internal?
241
241
  # link on another page, e.g. /about#Team - need to get HTML from the other page
242
242
  create_nokogiri(absolute_path)
243
+ else
244
+ raise NotImplementedError, 'HTMLProofer should not have gotten here. Please report this as a bug.'
243
245
  end
244
246
  end
245
247
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTMLProofer
4
- VERSION = '3.14.0'
4
+ VERSION = '3.14.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-proofer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.14.0
4
+ version: 3.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian