From 9810c62339b1d0286ee25fa2bdc02a5e03ae3559 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Mon, 6 Jan 2020 06:44:39 -0800 Subject: [PATCH] updated error stop criterion for iterations --- lib/Perl/Tidy.pm | 1 + lib/Perl/Tidy/Tokenizer.pm | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 3ecfcb15..a107d08b 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -1178,6 +1178,7 @@ EOM # stop iterations if errors or converged my $stop_now = $tokenizer->report_tokenization_errors(); + $stop_now ||= $tokenizer->get_unexpected_error_count(); if ($stop_now) { $convergence_log_message = <{_unexpected_error_count}; +} + # interface to Perl::Tidy::Diagnostics routines sub write_diagnostics { my $msg = shift; -- 2.39.5