Skip to content

Commit 7e1aa11

Browse files
authored
Clean up space between report and summary (#51)
1 parent 4fb00e3 commit 7e1aa11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ module.exports = {
3737
* @param {string} report
3838
*/
3939
function generatePostrunMessage(issueCount, report) {
40+
// Only print a line between the report and the summary
41+
// if the report has any contents.
42+
const spacer = report.length > 0 ? '\n' : ''
4043
const humanReadableCount = issueCount === 0 ? 'No' : issueCount
4144
const summary = `${humanReadableCount} accessibility violations found! ${
4245
issueCount > 0 ? 'Check the logs above for more information.' : ''
4346
}`
44-
return report + '\n' + pico.magenta(summary)
47+
return report + spacer + pico.magenta(summary)
4548
}

0 commit comments

Comments
 (0)