Style changes

This commit is contained in:
Natalie Weizenbaum 2019-05-14 17:39:18 -07:00
parent bca5235eb4
commit 9dbf71b8fa
2 changed files with 6 additions and 9 deletions

View File

@ -6,4 +6,4 @@ install:
- npm ci
script:
- npm test
- npm test

View File

@ -22,16 +22,13 @@ files.forEach(function (file) {
console.log('Reading: ' + file)
var markdownToc = toc(markdown, {
filter: (string, _, __) => string.indexOf('Table of Contents') === -1
}).content
// Get a list of all headers so we can verify intra-document links.
var markdownToc = toc(markdown).content
results.forEach(function (result) {
if (result.link.match(/^#/)) {
if (!markdownToc.includes(result.link)) {
result.status = 'dead'
result.statusCode = 0
}
if (result.link.match(/^#/) && !markdownToc.includes(result.link)) {
result.status = 'dead'
result.statusCode = 0
}
if (result.status === 'dead') {