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 +4 -4
- data/lib/html-proofer/element.rb +5 -3
- data/lib/html-proofer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e652993805b4e62434a27fd09f20936c71d1abfa2588e1ea991ed00d5174cfa4
|
|
4
|
+
data.tar.gz: 1e4feee6f61dbadd8ed0d91e25950c0f643e3f29ee1cf881fa9bde6f37854901
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a6955c42ec89662b66b83422555e0d43c837f2d11f9e67bf85f587b2301d7c24f6f0275e16b31c904ee9da2999dde8583994d532f5be7a2b2f838dda2dab6e1b
|
|
7
|
+
data.tar.gz: d261d16b8fcd86ceeac73eac6594b3c30a589015b5400ad785e879ce8b77ad7793fd85609063b6b57ffb08333ac07e1982a1b7cae449ab3e7cc5e0f1c36d6e5d
|
data/lib/html-proofer/element.rb
CHANGED
|
@@ -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 =~ /^\
|
|
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
|
|
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
|
|
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
|
data/lib/html-proofer/version.rb
CHANGED