Remove leading newline from clearsigned messages armoring (#1560)

This commit is contained in:
Daniel Huigens 2022-08-30 13:40:57 +02:00 committed by GitHub
parent 4d2cf85a51
commit 5e6dd8b1ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -386,7 +386,7 @@ export function armor(messageType, body, partIndex, partTotal, customComment, co
result.push('-----END PGP MESSAGE, PART ' + partIndex + '-----\n');
break;
case enums.armor.signed:
result.push('\n-----BEGIN PGP SIGNED MESSAGE-----\n');
result.push('-----BEGIN PGP SIGNED MESSAGE-----\n');
result.push('Hash: ' + hash + '\n\n');
result.push(text.replace(/^-/mg, '- -'));
result.push('\n-----BEGIN PGP SIGNATURE-----\n');