From: Steve Hancock Date: Tue, 12 Jun 2018 21:31:49 +0000 (-0700) Subject: patch for rt#125506, lost space in quote with -io X-Git-Tag: 20181117~29 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b320733b243a9cac90ebbb562c92de202f188424;p=perltidy.git patch for rt#125506, lost space in quote with -io --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 88ec4010..4ab86b9b 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -6392,7 +6392,11 @@ EOM $line .= $rinput_token_array->[$jj]->[_TOKEN_]; } } - $line = trim($line); + + # Fix for rt #125506 Unexpected string formating + # in which leading space of a terminal quote was removed + $line =~ s/\s+$//; + $line =~ s/^\s+// unless ($in_continued_quote); $self->extract_token(0); $token = $line;