Skip to content

Commit f44ede0

Browse files
committed
nit: Formatting
1 parent 3c61628 commit f44ede0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/fileIssueForResult.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,16 @@ 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") && line.trim() !== "") { return `- ${line}`; } else { return line; } }).join('\n');
10+
const solutionLong = result.solutionLong
11+
?.split("\n")
12+
.map((line) =>
13+
!line.trim().startsWith("Fix any") &&
14+
!line.trim().startsWith("Fix all") &&
15+
line.trim() !== ""
16+
? `- ${line}`
17+
: line
18+
)
19+
.join("\n");
1120
const body = `
1221
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}.
1322

0 commit comments

Comments
 (0)