Bugzilla – Attachment 163242 Details for
Bug 36333
Remove all empty lines from template's output
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36333: Remove empty lines from template's output
Bug-36333-Remove-empty-lines-from-templates-output.patch (text/plain), 903 bytes, created by
Jonathan Druart
on 2024-03-15 14:20:42 UTC
(
hide
)
Description:
Bug 36333: Remove empty lines from template's output
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2024-03-15 14:20:42 UTC
Size:
903 bytes
patch
obsolete
>From d98f00cd4564072b21008698125979758365c6c7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36333
:
163242
|
163279