Lines 73-78
sub text{
Link Here
|
73 |
my $line = shift; |
73 |
my $line = shift; |
74 |
my $work = shift; # original text |
74 |
my $work = shift; # original text |
75 |
my $is_cdata = shift; |
75 |
my $is_cdata = shift; |
|
|
76 |
# If there is a split template toolkit tag |
77 |
if( $work =~ m/.*?%\]/s && index($&, '[%') == -1 ) { |
78 |
my @strings = ($&); |
79 |
my $token; |
80 |
$work = $'; |
81 |
while($token = pop @tokens){ |
82 |
if ( $token->string =~ m/\[%.*?$/s ) { |
83 |
push @tokens, C4::TmplToken->new( $`, $token->type, $token->line_number, $token->pathname ); |
84 |
push @strings, $&; |
85 |
last; |
86 |
} else { |
87 |
push @strings, $token->string; |
88 |
} |
89 |
} |
90 |
push @tokens, C4::TmplToken->new( join('', reverse @strings), C4::TmplTokenType::DIRECTIVE, $token ? $token->line_number : $line, $self->{filename} ); |
91 |
} |
76 |
while($work){ |
92 |
while($work){ |
77 |
# if there is a template_toolkit tag |
93 |
# if there is a template_toolkit tag |
78 |
if( $work =~ m/\[%.*?%\]/ ){ |
94 |
if( $work =~ m/\[%.*?%\]/ ){ |
79 |
- |
|
|