[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.4,1.5
From: |
Ambrose Li |
Subject: |
[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.4,1.5 |
Date: |
Thu, 12 Feb 2004 09:38:44 -0800 |
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23081
Modified Files:
text-extract2.pl
Log Message:
It now knows what << Prev is, but it may still be confused by other kinds
of tag lookalikes
Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** text-extract2.pl 12 Feb 2004 09:38:20 -0000 1.4
--- text-extract2.pl 12 Feb 2004 17:38:42 -0000 1.5
***************
*** 8,12 ****
# This script is meant to be a drop-in replacement of text-extract.pl
! # FIXME: Strings like "<< Prev" confuses *this* filter
use Getopt::Long;
--- 8,13 ----
# This script is meant to be a drop-in replacement of text-extract.pl
! # FIXME: Strings like "<< Prev" or "Next >>" may confuse *this* filter
! # TODO: Need to detect unclosed tags, empty tags, and other such stuff.
use Getopt::Long;
***************
*** 94,98 ****
} elsif ($readahead =~ /^\s+/s) { # whitespace
($kind, $it, $readahead) = (KIND_TEXT, $&, $');
! } elsif ($readahead =~ /^[^<]+/s) { # non-whitespace normal text
($kind, $it, $readahead) = (KIND_TEXT, $&, $');
} else { # tag/declaration/processing instruction
--- 95,100 ----
} elsif ($readahead =~ /^\s+/s) { # whitespace
($kind, $it, $readahead) = (KIND_TEXT, $&, $');
! # FIXME the following (the [<\s] part) is an unreliable HACK :-(
! } elsif ($readahead =~ /^(?:[^<]|<[<\s])+/s) { # non-space normal text
($kind, $it, $readahead) = (KIND_TEXT, $&, $');
} else { # tag/declaration/processing instruction
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.4,1.5,
Ambrose Li <=