diff --git a/misc/devel/tidy.pl b/misc/devel/tidy.pl index 419961759a..5809f7aebc 100755 --- a/misc/devel/tidy.pl +++ b/misc/devel/tidy.pl @@ -132,16 +132,19 @@ sub tidy_vue { sub tidy_tt { my ($file) = @_; - my ( $success, $error_message, $full_buf, $stdout_buf, $stderr_buf ) = - run( command => sprintf q{yarn --silent run prettier --write %s}, $file ); - if ($success) { + my ( $success, $error_message, $full_buf, $stdout_buf, $stderr_buf ); + for ( 1 .. 2 ) { + ( $success, $error_message, $full_buf, $stdout_buf, $stderr_buf ) = + run( command => sprintf q{yarn --silent run prettier --write %s}, $file ); + if ($success) { - # Revert the substitutions done by the prettier plugin - edit_file sub { - s###g; - s##-->##g; - }, $file; + # Revert the substitutions done by the prettier plugin + edit_file sub { + s###g; + s##-->##g; + }, $file; + } } return ( $success, $error_message, $full_buf, $stdout_buf, $stderr_buf ); }