Bugzilla – Attachment 80716 Details for
Bug 21576
Add a developer script to automatically fix missing filters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21576: Preserve chomp chars for USE raw
Bug-21576-Preserve-chomp-chars-for-USE-raw.patch (text/plain), 1.50 KB, created by
Jonathan Druart
on 2018-10-17 14:30:30 UTC
(
hide
)
Description:
Bug 21576: Preserve chomp chars for USE raw
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-10-17 14:30:30 UTC
Size:
1.50 KB
patch
obsolete
>From fea6d8d1ded72345551299d93ce29d365aca5c64 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 17 Oct 2018 11:29:16 -0300 >Subject: [PATCH] Bug 21576: Preserve chomp chars for USE raw > >See bug 21526 comments 5-7 > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/lib/QA/TemplateFilters.pm | 2 +- > t/template_filters.t | 4 ++-- > 2 files changed, 3 insertions(+), 3 deletions(-) > >diff --git a/t/lib/QA/TemplateFilters.pm b/t/lib/QA/TemplateFilters.pm >index f270388c19..bc36912cb2 100644 >--- a/t/lib/QA/TemplateFilters.pm >+++ b/t/lib/QA/TemplateFilters.pm >@@ -66,7 +66,7 @@ sub _process_tt_content { > } > > $has_use_raw++ >- if $line =~ m{\[% USE raw %\]}; # Does [% Use raw %] exist? >+ if $line =~ m{\[%(\s|-|~)*USE raw(\s|-|~)*%\]}; # Does [% Use raw %] exist? > > my $e; > if ( $line =~ qr{<a href="([^"]+)} ) { >diff --git a/t/template_filters.t b/t/template_filters.t >index c4bb841448..33e1af9510 100644 >--- a/t/template_filters.t >+++ b/t/template_filters.t >@@ -171,7 +171,7 @@ EXPECTED > subtest 'Preserve pre/post chomps' => sub { > plan tests => 1; > my $input = <<INPUT; >-[% USE raw %] >+[%- USE raw -%] > [%- var -%] > [% - var - %] > [%~ var ~%] >@@ -182,7 +182,7 @@ subtest 'Preserve pre/post chomps' => sub { > [%~ var | uri ~%] > INPUT > my $expected = <<EXPECTED; >-[% USE raw %] >+[%- USE raw -%] > [%- var | html -%] > [%- var | html -%] > [%~ var | html ~%] >-- >2.11.0
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 21576
:
80640
|
80642
|
80644
|
80648
|
80659
|
80660
|
80671
|
80672
|
80673
|
80694
|
80695
|
80696
|
80716
|
81060
|
81061
|
81062
|
81063