From d98f00cd4564072b21008698125979758365c6c7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 15 Mar 2024 15:19:01 +0100 Subject: [PATCH] Bug 36333: Remove empty lines from template's output This patch removes empty lines (containing only whitespaces) from the output. It does not have the intented result, we don't gain much in term of size. However the source is way cleaner and easier to read. --- C4/Templates.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Templates.pm b/C4/Templates.pm index fb7d3e5cb56..e2d2d02c7a0 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -133,6 +133,7 @@ sub output { binmode( STDOUT, ":encoding(UTF-8)" ); $template->process( $self->filename, $vars, \$data ) || die "Template process failed: ", $template->error(); + $data =~ s{\n\s*\n}{\n}g; return $data; } -- 2.34.1