[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.15,1.16
From: |
Ambrose C. LI |
Subject: |
[Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.15,1.16 |
Date: |
Thu, 19 Feb 2004 23:52:35 -0800 |
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16902
Modified Files:
TmplTokenizer.pm
Log Message:
Fixed bug where a <textarea...>#cdata</textarea> on one line won't be
scanned properly.
Index: TmplTokenizer.pm
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/TmplTokenizer.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** TmplTokenizer.pm 20 Feb 2004 07:09:47 -0000 1.15
--- TmplTokenizer.pm 20 Feb 2004 07:52:32 -0000 1.16
***************
*** 323,332 ****
for (my $cdata_close = $this->cdata_close;;) {
if ($this->cdata_mode_p) {
! if ($this->_peek_readahead =~ /^$cdata_close/) {
($kind, $it) = (TmplTokenType::TAG, $&);
! $this->_set_readahead( $' );
$ok_p = 1;
} else {
! ($kind, $it) = (TmplTokenType::TEXT, $this->_pop_readahead);
$ok_p = 1;
}
--- 323,337 ----
for (my $cdata_close = $this->cdata_close;;) {
if ($this->cdata_mode_p) {
! my $next = $this->_pop_readahead;
! if ($next =~ /^$cdata_close/) {
($kind, $it) = (TmplTokenType::TAG, $&);
! $this->_push_readahead( $' );
! $ok_p = 1;
! } elsif ($next =~ /^((?:(?!$cdata_close).)+)($cdata_close)/) {
! ($kind, $it) = (TmplTokenType::TEXT, $1);
! $this->_push_readahead( "$2$'" );
$ok_p = 1;
} else {
! ($kind, $it) = (TmplTokenType::TEXT, $next);
$ok_p = 1;
}
***************
*** 447,451 ****
} else {
$it = $this->_next_token_intermediate($h);
! if ($this->allow_cformat_p && defined $it
&& ($it->type == TmplTokenType::TEXT?
!blank_p( $it->string ): _token_groupable_p( $it ))) {
--- 452,456 ----
} else {
$it = $this->_next_token_intermediate($h);
! if (!$this->cdata_mode_p && $this->allow_cformat_p && defined $it
&& ($it->type == TmplTokenType::TEXT?
!blank_p( $it->string ): _token_groupable_p( $it ))) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator TmplTokenizer.pm,1.15,1.16,
Ambrose C. LI <=