summaryrefslogtreecommitdiff
path: root/gmi2email
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-01-23 18:15:24 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-01-23 18:15:24 -0700
commitc3b79c295706791b809024f5247fc366a7c78c53 (patch)
tree55ca39975a8d15c49804395cf8ff32eeaf26e5cf /gmi2email
parentb23033238d8ae711cdb9bddcf6a1b21b2066fb6d (diff)
downloadmailscripts-c3b79c295706791b809024f5247fc366a7c78c53.tar.gz
gmi2email: avoid blank lines within lists of links
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'gmi2email')
-rwxr-xr-xgmi2email7
1 files changed, 5 insertions, 2 deletions
diff --git a/gmi2email b/gmi2email
index 0d7615b..75816e6 100755
--- a/gmi2email
+++ b/gmi2email
@@ -257,9 +257,12 @@ sub gemtext_to_mail {
Filename => (split "/", $uri)[-1],
Disposition => "inline"
);
- } elsif (/^(?:=>|#+)/) {
- &$pad;
+ } elsif (/^=>/) {
+ &$pad unless @buffer and $buffer[$#buffer] =~ /^=>/;
push @buffer, $_;
+ } elsif (/^#+/) {
+ &$pad;
+ push @buffer, $_;
} else {
&$pad;
push @buffer, split "\n", wrap "", "", $_;