Bugzilla – Attachment 163279 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), 950 bytes, created by
David Nind
on 2024-03-15 20:50:09 UTC
(
hide
)
Description:
Bug 36333: Remove empty lines from template's output
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-03-15 20:50:09 UTC
Size:
950 bytes
patch
obsolete
>From 7ef11b46f29d4389b59bb977d5602488edfa633a 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. > >Signed-off-by: David Nind <david@davidnind.com> >--- > 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
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