Fix EOL issues - remove all \r from annotation message

This commit is contained in:
Michal Dorner 2021-01-14 22:34:00 +01:00
parent 4197e7a327
commit 760c090915
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
7 changed files with 20 additions and 13 deletions

View file

@ -30,3 +30,7 @@ export function table(headers: ToString[], align: ToString[], ...rows: ToString[
export function tableEscape(content: ToString): string {
return content.toString().replace('|', '\\|')
}
export function fixEol(text?: string): string {
return text?.replace(/\r/g, '') ?? ''
}