]> git.donarmstrong.com Git - perltidy.git/commitdiff
patch for rt#125506, lost space in quote with -io
authorSteve Hancock <perltidy@users.sourceforge.net>
Tue, 12 Jun 2018 21:31:49 +0000 (14:31 -0700)
committerSteve Hancock <perltidy@users.sourceforge.net>
Tue, 12 Jun 2018 21:31:49 +0000 (14:31 -0700)
lib/Perl/Tidy/Formatter.pm

index 88ec40100884ebf9256a81e5d2714d38c36bce4a..4ab86b9b511fea4f39c69214d9cb8a318f2b8da0 100644 (file)
@@ -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;