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 <katrin.fischer@bsz-bw.de>
This commit is contained in:
Jonathan Druart 2025-02-10 21:41:33 +01:00 committed by Katrin Fischer
parent 616102740a
commit a3c5620cc6
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,8 @@ sub tidy_tt {
$content =~ s#<!--</body>-->#</body>#g;
$content =~ s#\n*( *)<script>\n*#\n$1<script>\n#g;
$content =~ s#\n*( *)</script>\n*#\n$1</script>\n#g;
$content =~ s#(\[%\s*SWITCH[^\]]*\]\n)\n#$1#g;
if ( $no_write && $pass == 2 ) {
print $content;
} else {