Skip to content

Commit 6749eb0

Browse files
committed
remove empty lines
1 parent ba3ea77 commit 6749eb0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async function run(): Promise<void> {
5858
})
5959

6060
core.info(output)
61-
61+
output = removeStarLines(output)
6262
output = output.replace(/%/g, '%25')
6363
output = output.replace(/\n/g, '%0A')
6464
output = output.replace(/\r/g, '%0D')
@@ -71,4 +71,10 @@ async function run(): Promise<void> {
7171
})
7272
}
7373

74+
function removeStarLines(inputString: string, lineBreak: string = '\n'): string {
75+
const lines = inputString.split(lineBreak)
76+
const filteredLines = lines.filter(line => line.trim() !== '*')
77+
return filteredLines.join(lineBreak)
78+
}
79+
7480
run()

0 commit comments

Comments
 (0)