From 32e761b2aa1bea94dfbbd80c752e08a32351d155 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Thu, 23 Sep 2010 17:36:20 +0200 Subject: Tighten tidymsg() to preserve single newlines. --- localmarkdown2sms | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'localmarkdown2sms') diff --git a/localmarkdown2sms b/localmarkdown2sms index bee8c74..40ba6c6 100755 --- a/localmarkdown2sms +++ b/localmarkdown2sms @@ -190,12 +190,10 @@ foreach my $file (read_dir( $path )) { sub tidymsg { my $msg = shift @_; - $msg =~ s/^\h*$//g; # clean virtually empty lines - $msg =~ s/(\S)\h$/$1/g; # strip single trailing space + $msg =~ s/(?