Merge remote branch 'kc/new/enh/bug_5917' into kcmaster
This commit is contained in:
commit
7e86e23ea1
1 changed files with 8 additions and 6 deletions
|
@ -233,6 +233,7 @@ sub string_canon ($) {
|
|||
my $s = shift;
|
||||
# Fold all whitespace into single blanks
|
||||
$s =~ s/\s+/ /g;
|
||||
$s =~ s/^\s+//g;
|
||||
return $s;
|
||||
}
|
||||
|
||||
|
@ -273,7 +274,7 @@ sub _formalize{
|
|||
}
|
||||
} else{
|
||||
return _quote_cformat $t->string;
|
||||
}
|
||||
}
|
||||
} else{
|
||||
return _quote_cformat $t->string;
|
||||
}
|
||||
|
@ -324,7 +325,7 @@ sub next_token {
|
|||
push @parts, $next;
|
||||
}
|
||||
elsif( $next->type == TmplTokenType::DIRECTIVE && $next->string =~ m/\[%\s*\w+\s*%\]/ ){
|
||||
return $next;
|
||||
push @parts, $next;
|
||||
}
|
||||
elsif ( $next->type == TmplTokenType::CDATA){
|
||||
$self->_set_js_mode(1);
|
||||
|
@ -339,13 +340,14 @@ sub next_token {
|
|||
}
|
||||
push @head, _split_js $s0;
|
||||
$next->set_js_data(_identify_js_translatables(@head, @tail) );
|
||||
return $next;
|
||||
|
||||
return $next unless @parts;
|
||||
$self->{_parser}->unshift_token($next);
|
||||
return $self->_parametrize_internal(@parts);
|
||||
}
|
||||
else {
|
||||
# if there is nothing in parts, return this token
|
||||
|
||||
return $next unless @parts;
|
||||
return $next unless @parts;
|
||||
|
||||
# OTHERWISE, put this token back and return the parametrized string of @parts
|
||||
$self->{_parser}->unshift_token($next);
|
||||
return $self->_parametrize_internal(@parts);
|
||||
|
|
Loading…
Reference in a new issue