From 107013118fb84481ee3cef22193b0d45c9d9082f Mon Sep 17 00:00:00 2001 From: Reiley Yang Date: Mon, 21 Mar 2022 10:42:34 -0700 Subject: [PATCH 1/2] Fix the anchor regression --- test/hash-links.md | 6 ++++++ test/markdown-link-check.test.js | 1 + 2 files changed, 7 insertions(+) diff --git a/test/hash-links.md b/test/hash-links.md index 1c067eb..0da847c 100644 --- a/test/hash-links.md +++ b/test/hash-links.md @@ -1,5 +1,9 @@ # Foo + + + + This is a test. ## Bar @@ -13,3 +17,5 @@ The second section is [Bar](#bar). ## Uh, oh There is no section named [Potato](#potato). + +There is an anchor named [Tomato](#tomato). diff --git a/test/markdown-link-check.test.js b/test/markdown-link-check.test.js index bcf812e..cc88230 100644 --- a/test/markdown-link-check.test.js +++ b/test/markdown-link-check.test.js @@ -346,6 +346,7 @@ describe('markdown-link-check', function () { { link: '#foo', statusCode: 200, err: null, status: 'alive' }, { link: '#bar', statusCode: 200, err: null, status: 'alive' }, { link: '#potato', statusCode: 404, err: null, status: 'dead' }, + { link: '#tomato', statusCode: 404, err: null, status: 'alive' }, ]); done(); }); From 556575d88ed6dc8428c257b00b2da5bfbb59f66c Mon Sep 17 00:00:00 2001 From: Reiley Yang Date: Mon, 21 Mar 2022 10:51:25 -0700 Subject: [PATCH 2/2] fix status code --- test/markdown-link-check.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/markdown-link-check.test.js b/test/markdown-link-check.test.js index cc88230..c5bcd29 100644 --- a/test/markdown-link-check.test.js +++ b/test/markdown-link-check.test.js @@ -346,7 +346,7 @@ describe('markdown-link-check', function () { { link: '#foo', statusCode: 200, err: null, status: 'alive' }, { link: '#bar', statusCode: 200, err: null, status: 'alive' }, { link: '#potato', statusCode: 404, err: null, status: 'dead' }, - { link: '#tomato', statusCode: 404, err: null, status: 'alive' }, + { link: '#tomato', statusCode: 200, err: null, status: 'alive' }, ]); done(); });