From 7ef11b46f29d4389b59bb977d5602488edfa633a 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. Signed-off-by: David Nind --- C4/Templates.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/C4/Templates.pm b/C4/Templates.pm index fb7d3e5cb5..e2d2d02c7a 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.30.2