Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/main/github/access…
Browse files Browse the repository at this point in the history
…ibility-alt-text-bot-1.3.0
  • Loading branch information
ttsukagoshi authored Jan 28, 2024
2 parents 8280840 + 14e2188 commit d5679b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export default async function (options: CommandOption): Promise<void> {
const urls: string[] = fs
.readFileSync(filePath /*, { encoding: config.encoding }*/)
.toString()
.trim()
.replace(/\r?\n/g, ',')
.split(',');

Expand All @@ -71,7 +72,12 @@ export default async function (options: CommandOption): Promise<void> {
let outputText: string = raw ? '' : REPORT_HEADER.join();
const rawAxeResults: RawAxeResults = {};
for (let i = 0; i < urls.length; i++) {
const url: string = urls[i];
const url: string = urls[i].trim();

if (!url) {
continue;
}

const page: puppeteer.Page = await browser.newPage();
await page.setBypassCSP(true);
/* Emulate device: left here as a potential option for the future
Expand Down

0 comments on commit d5679b7

Please sign in to comment.