From: Steve Hancock Date: Wed, 1 Mar 2023 22:35:57 +0000 (-0800) Subject: fix c198 X-Git-Tag: 20230309~5 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1454f6f97ac9f4a2c6f5e026c2f48e3e8f3ba7b3;p=perltidy.git fix c198 --- diff --git a/lib/Perl/Tidy/Formatter.pm b/lib/Perl/Tidy/Formatter.pm index 50051a06..b5742f06 100644 --- a/lib/Perl/Tidy/Formatter.pm +++ b/lib/Perl/Tidy/Formatter.pm @@ -11183,8 +11183,10 @@ EOM # Keep a broken container broken at multiple welds. This might # also be useful for simple welds, but for now it is restricted # to multiple welds to minimize changes to existing coding. This - # fixes b1429, b1430. - if ( $iline_io != $iline_ic ) { + # fixes b1429, b1430. Updated for issue c198: but allow a + # line differences of 1 (simple shear) so that a simple shear + # can remain or become a single line. + if ( $iline_ic - $iline_io > 1 ) { # Only set this break if it is the last possible weld in this # chain. This will keep some extreme test cases unchanged.