mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-12-10 06:11:08 +01:00
Support multiline comments in ProducerOption.setComment().
This commit is contained in:
parent
53f7815778
commit
7a77d0847a
2 changed files with 17 additions and 5 deletions
|
|
@ -76,7 +76,12 @@ public final class EncryptionStream extends OutputStream {
|
|||
LOGGER.debug("Wrap encryption output in ASCII armor");
|
||||
armorOutputStream = ArmoredOutputStreamFactory.get(outermostStream);
|
||||
if (options.hasComment()) {
|
||||
ArmorUtils.addCommentHeader(armorOutputStream, options.getComment());
|
||||
String[] commentLines = options.getComment().split("\n");
|
||||
for (String commentLine : commentLines) {
|
||||
if (!commentLine.trim().isEmpty()) {
|
||||
ArmorUtils.addCommentHeader(armorOutputStream, commentLine);
|
||||
}
|
||||
}
|
||||
}
|
||||
outermostStream = armorOutputStream;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue