diff --git a/.github/workflows/a11y_alt_text_bot.yml b/.github/workflows/a11y_alt_text_bot.yml index e93bc01..fe8acce 100644 --- a/.github/workflows/a11y_alt_text_bot.yml +++ b/.github/workflows/a11y_alt_text_bot.yml @@ -23,5 +23,5 @@ jobs: if: ${{ github.event.issue || github.event.pull_request || github.event.discussion }} steps: - name: Get action 'github/accessibility-alt-text-bot' - uses: github/accessibility-alt-text-bot@v1.2.0 # Set to latest + uses: github/accessibility-alt-text-bot@v1.3.0 # Set to latest diff --git a/src/commands/run.ts b/src/commands/run.ts index 78b0c52..feb73cd 100644 --- a/src/commands/run.ts +++ b/src/commands/run.ts @@ -56,6 +56,7 @@ export default async function (options: CommandOption): Promise { const urls: string[] = fs .readFileSync(filePath /*, { encoding: config.encoding }*/) .toString() + .trim() .replace(/\r?\n/g, ',') .split(','); @@ -71,7 +72,12 @@ export default async function (options: CommandOption): Promise { 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