From: Matt S Trout Date: Mon, 9 Sep 2019 00:02:44 +0000 (+0000) Subject: fix indentation and newlines for more cases X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e7d3a4e5109a355d381cd6c35235e4ef02f7f67c;p=scpubgit%2FQ-Branch.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; } }