From 1454f6f97ac9f4a2c6f5e026c2f48e3e8f3ba7b3 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Wed, 1 Mar 2023 14:35:57 -0800 Subject: [PATCH] fix c198 --- lib/Perl/Tidy/Formatter.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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. -- 2.39.5