Bug 15687 [QA Followup] - Tidy sub to remove tab characters

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2016-01-28 21:24:52 +00:00 committed by Brendan Gallagher
parent 70112cfb81
commit 6d24219976
1 changed files with 15 additions and 9 deletions

View File

@ -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 ''
);
}
###############################################################################