From b320733b243a9cac90ebbb562c92de202f188424 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Tue, 12 Jun 2018 14:31:49 -0700 Subject: [PATCH] patch for rt#125506, lost space in quote with -io --- lib/Perl/Tidy/Formatter.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.5