From 6d24219976c332c8fb7da69ceab6374627aeb95c Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 28 Jan 2016 21:24:52 +0000 Subject: [PATCH] Bug 15687 [QA Followup] - Tidy sub to remove tab characters Signed-off-by: Kyle M Hall --- misc/translator/xgettext.pl | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/misc/translator/xgettext.pl b/misc/translator/xgettext.pl index 0b5e6d83ad..8d555478ad 100755 --- a/misc/translator/xgettext.pl +++ b/misc/translator/xgettext.pl @@ -45,17 +45,23 @@ sub string_negligible_p { } sub token_negligible_p { - my($x) = @_; + my ($x) = @_; my $t = $x->type; return !$extract_all_p && ( - $t == C4::TmplTokenType::TEXT() ? string_negligible_p( $x->string ) : - $t == C4::TmplTokenType::DIRECTIVE() ? 1 : - $t == C4::TmplTokenType::TEXT_PARAMETRIZED() - && join( '', map { my $t = $_->type; - $t == C4::TmplTokenType::DIRECTIVE() ? - '1' : $t == C4::TmplTokenType::TAG() ? - '' : token_negligible_p( $_ ) ? - '' : '1' } @{$x->children} ) eq '' ); + $t == C4::TmplTokenType::TEXT() ? string_negligible_p( $x->string ) + : $t == C4::TmplTokenType::DIRECTIVE() ? 1 + : $t == C4::TmplTokenType::TEXT_PARAMETRIZED() + && join( + '', + map { + my $t = $_->type; + $t == C4::TmplTokenType::DIRECTIVE() ? '1' + : $t == C4::TmplTokenType::TAG() ? '' + : token_negligible_p($_) ? '' + : '1' + } @{ $x->children } + ) eq '' + ); } ############################################################################### -- 2.39.5