From a3c5620cc6c4d7d9fac369dcddb265bfd459257c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 10 Feb 2025 21:41:33 +0100 Subject: [PATCH] Bug 38664: The tidy script: remove blank line after SWITCH The prettier plugin does not deal correctly with SWITCH https://gitlab.com/koha-community/prettier-plugin-template-toolkit/-/issues/2 Signed-off-by: Katrin Fischer --- misc/devel/tidy.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/misc/devel/tidy.pl b/misc/devel/tidy.pl index d2c8c9984d..9fbdfe8148 100755 --- a/misc/devel/tidy.pl +++ b/misc/devel/tidy.pl @@ -176,6 +176,8 @@ sub tidy_tt { $content =~ s###g; $content =~ s#\n*( *)\n*#\n$1\n#g; + $content =~ s#(\[%\s*SWITCH[^\]]*\]\n)\n#$1#g; + if ( $no_write && $pass == 2 ) { print $content; } else {