Skip to content
This repository has been archived by the owner on May 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #5 from gaurav-nelson/addFileNameInOutput
Browse files Browse the repository at this point in the history
Lists filename
  • Loading branch information
Gaurav Nelson committed Sep 11, 2017
2 parents 2be9d76 + 563e3e6 commit 795958a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions asciidoc-link-check
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,21 @@ var asciidoc = ''; // collect the asciidoc data, then process it
stream.on('data', function (chunk) {
asciidoc += chunk.toString();
}).on('end', function () {
if (process.argv[2]) {
console.log(chalk.blue('\nFILE: ' + process.argv[2]))
}
asciidocLinkCheck(asciidoc, opts, function (err, results) {
if (results.length === 0) {
console.log(chalk.yellow('No hyperlinks found!'))
console.log(chalk.yellow('No hyperlinks found!\n'))
}
results.forEach(function (result) {
if(result.status === 'dead') {
if (result.status === 'dead') {
error = true;
}
console.log('[%s] %s', statusLabels[result.status], result.link);
});
if(error) {
console.error(chalk.red('\nERROR: dead links found!'));
if (error) {
console.error(chalk.red('ERROR: dead links found!\n'));
process.exit(1);
}
});
Expand Down

0 comments on commit 795958a

Please sign in to comment.