From 9a18b6cc3f09a6b79a563d96589f87fc9a055194 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 27 Feb 2013 16:56:33 +0100 Subject: [PATCH] =?utf8?q?locales.pl:=20Multi-Zeilen-Aufrufe=20von=20rende?= =?utf8?q?r()=20behandeln=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Machmal sieht das nämlich so aus: $self->render( 'some/template', unicorn => 'Charlie', %params, COW => 'Moo!' ); --- scripts/locales.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/locales.pl b/scripts/locales.pl index 5e6a8a532..d8ff9c66a 100755 --- a/scripts/locales.pl +++ b/scripts/locales.pl @@ -358,6 +358,13 @@ sub scanfile { $cached{$file}{scannosubs}{"../../SL/${module}.pm"} = 1; } + # Some calls to render() are split over multiple lines. Deal + # with that. + while (/(?:parse_html_template2?|render)\s*\( *$/) { + $_ .= <$fh>; + chomp; + } + # is this a template call? if (/(?:parse_html_template2?|render)\s*\(\s*[\"\']([\w\/]+)\s*[\"\']/) { my $new_file_base = "$basedir/templates/webpages/$1."; -- 2.20.1