Skip to content

Commit 3c61628

Browse files
committed
fix: Don’t add bullet points to blank lines
1 parent 513d7ac commit 3c61628

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fileIssueForResult.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export async function fileIssueForResult(octokit: Octokit, repoWithOwner: string
77
const owner = repoWithOwner.split('/')[0];
88
const repo = repoWithOwner.split('/')[1];
99
const title = `Accessibility issue: ${result.problemShort[0].toUpperCase() + result.problemShort.slice(1)} on ${new URL(result.url).pathname}`;
10-
const solutionLong = result.solutionLong?.split('\n').map((line) => { if (!line.trim().startsWith("Fix any") && !line.trim().startsWith("Fix all")) { return `- ${line}`; } else { return line; } }).join('\n');
10+
const solutionLong = result.solutionLong?.split('\n').map((line) => { if (!line.trim().startsWith("Fix any") && !line.trim().startsWith("Fix all") && line.trim() !== "") { return `- ${line}`; } else { return line; } }).join('\n');
1111
const body = `
1212
An accessibility scan flagged the element \`${result.html}\` on ${result.url} because ${result.problemShort}. Learn more about why this was flagged by visiting ${result.problemUrl}.
1313

0 commit comments

Comments
 (0)