From: Matt S Trout Date: Mon, 9 Sep 2019 00:02:44 +0000 (+0000) Subject: fix indentation and newlines for more cases X-Git-Tag: v2.000000~3^2~154 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cd93bc22674331f72680fc1fc53ac49d6e5a2524;p=dbsrgits%2FSQL-Abstract.git fix indentation and newlines for more cases --- diff --git a/lib/SQL/Abstract/Formatter.pm b/lib/SQL/Abstract/Formatter.pm index 98566eb..0eb799d 100644 --- a/lib/SQL/Abstract/Formatter.pm +++ b/lib/SQL/Abstract/Formatter.pm @@ -56,9 +56,9 @@ sub _fold_sql { if (length($line = $indent.$nl_post.$j) <= $w) { next PART; } - my $folded = $self->_fold_sql($indent, $next_indent, @$p); + my $folded = $self->_fold_sql($indent.$nl_post, $next_indent, @$p); $folded =~ s/\n\Z//; - push @res, $folded.$pre."\n"; + push @res, $folded.$nl_pre."\n"; $line = $idx == $#parts ? '' : $indent.$nl_post; } }