html-proofer 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -1
- data/lib/html/proofer.rb +1 -0
- data/lib/html/proofer/checks/links.rb +2 -2
- data/lib/html/proofer/version.rb +1 -2
- data/lib/html/proofer/xpathfunctions.rb +9 -0
- data/spec/html/proofer/fixtures/links/ignores_cases.html +3 -0
- data/spec/html/proofer/links_spec.rb +6 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 274af0ad1b09d54ed45076fce78d419715e80b71
|
4
|
+
data.tar.gz: 7ba668408b6fe5c1bb77052a8af00ac178a6c80d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfb1ba02f214bf85c84a84a1049290edbfc79b480d831eccb9733d6eb842b4b7929ed7b61535db7e7a4e8ddd60f7e5f98313e33c33e5dab2eb5015c211a8f43e
|
7
|
+
data.tar.gz: 6a76b81a593108b8924e0e2dff7c982d1cf73438236df45cff000517b4e0f95aac71f3a14d63e9d0f2a9d21f9767ae8ba3eaaf8e253069b96ff9999d2bb3e428
|
data/.travis.yml
CHANGED
data/lib/html/proofer.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
class LinkCheckable < ::HTML::Proofer::Checkable
|
3
2
|
|
4
3
|
def href
|
@@ -101,7 +100,8 @@ class LinkCheck < ::HTML::Proofer::CheckRunner
|
|
101
100
|
end
|
102
101
|
|
103
102
|
def hash_check(html, href_hash)
|
104
|
-
html.xpath("//*[@id
|
103
|
+
html.xpath("//*[case_insensitive_equals(@id, '#{href_hash}')]", \
|
104
|
+
"//*[case_insensitive_equals(@name, '#{href_hash}')]", HTML::Proofer::XpathFunctions.new).length > 0
|
105
105
|
end
|
106
106
|
|
107
107
|
end
|
data/lib/html/proofer/version.rb
CHANGED
@@ -361,4 +361,10 @@ describe 'Links test' do
|
|
361
361
|
proofer = run_proofer(fixture)
|
362
362
|
expect(proofer.failed_tests).to eq []
|
363
363
|
end
|
364
|
+
|
365
|
+
it 'does not complain for internal links with mismatched cases' do
|
366
|
+
fixture = "#{FIXTURES_DIR}/links/ignores_cases.html"
|
367
|
+
proofer = run_proofer(fixture)
|
368
|
+
expect(proofer.failed_tests).to eq []
|
369
|
+
end
|
364
370
|
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: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -207,6 +207,7 @@ files:
|
|
207
207
|
- lib/html/proofer/url_validator.rb
|
208
208
|
- lib/html/proofer/utils.rb
|
209
209
|
- lib/html/proofer/version.rb
|
210
|
+
- lib/html/proofer/xpathfunctions.rb
|
210
211
|
- script/bootstrap
|
211
212
|
- spec/html/proofer/checkable_spec.rb
|
212
213
|
- spec/html/proofer/command_spec.rb
|
@@ -282,6 +283,7 @@ files:
|
|
282
283
|
- spec/html/proofer/fixtures/links/head_link_href_empty.html
|
283
284
|
- spec/html/proofer/fixtures/links/ignorableLinks.html
|
284
285
|
- spec/html/proofer/fixtures/links/ignorableLinksViaOptions.html
|
286
|
+
- spec/html/proofer/fixtures/links/ignores_cases.html
|
285
287
|
- spec/html/proofer/fixtures/links/invalid_mailto_link.html
|
286
288
|
- spec/html/proofer/fixtures/links/javascript_link.html
|
287
289
|
- spec/html/proofer/fixtures/links/linkToFolder.html
|
@@ -471,6 +473,7 @@ test_files:
|
|
471
473
|
- spec/html/proofer/fixtures/links/head_link_href_empty.html
|
472
474
|
- spec/html/proofer/fixtures/links/ignorableLinks.html
|
473
475
|
- spec/html/proofer/fixtures/links/ignorableLinksViaOptions.html
|
476
|
+
- spec/html/proofer/fixtures/links/ignores_cases.html
|
474
477
|
- spec/html/proofer/fixtures/links/invalid_mailto_link.html
|
475
478
|
- spec/html/proofer/fixtures/links/javascript_link.html
|
476
479
|
- spec/html/proofer/fixtures/links/linkToFolder.html
|