Skip to content
Permalink
Browse files

Attempting to fix maximum url bug

  • Loading branch information
kylekirkby committed Nov 29, 2019
1 parent fcfc744 commit 04c07e4f5d02d7733b916647391d0962116a2c69
Showing with 6 additions and 8 deletions.
  1. +6 −8 lib/a11ym.js
@@ -46,7 +46,7 @@ var defaultOptions = {
filterByCodes : undefined,
excludeByCodes : undefined,
maximumDepth : 3,
maximumUrls : 128,
maximumUrls : 10000,
outputDirectory : './a11ym_output',
report : 'html',
reportOptions : {},
@@ -66,7 +66,7 @@ var defaultOptions = {
var logger = new Logger();

// Maximum number of URL to compute.
var maximumUrls = 0;
var maximumUrls = 10000;

// When an error occurs, update this flag. It will change the exit code of the
// process.
@@ -249,21 +249,19 @@ module.exports = {

if (0 === inputs.length) {
return false;
} else if ((1 === inputs.length && '-' === inputs[0]) || 1 < inputs.length) {
maximumUrls = 0;

}
else if ((1 === inputs.length && '-' === inputs[0]) || 1 < inputs.length) {
// Adds url to testQueue
var add = function (url) {
options.maximumUrls = ++maximumUrls;
testQueue.push(url);
};

// Added piped in URLS to testQueue
if('-' === inputs[0]) {
readline
.createInterface(process.stdin, undefined)
.on('line', add);
} else {
inputs.forEach(add);
options.maximumUrls = maximumUrls;
}
} else if (1 === maximumUrls) {
testQueue.push(inputs[0]);

0 comments on commit 04c07e4

Please sign in to comment.
You can’t perform that action at this time.