[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.6,1.7
Ambrose Li
acli at users.sourceforge.net
Thu Feb 12 18:58:36 CET 2004
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27256
Modified Files:
text-extract2.pl
Log Message:
extract_attributes now knows what XML-style self-closing tags are
Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** text-extract2.pl 12 Feb 2004 17:44:59 -0000 1.6
--- text-extract2.pl 12 Feb 2004 17:58:24 -0000 1.7
***************
*** 62,66 ****
my($s, $lc) = @_;
my %attr;
! $s = $1 if $s =~ /^<\S+(.*)\S$/s; # should be always true
for (my $i = 0; $s =~ /^\s+(?:([a-zA-Z][-a-zA-Z0-9]*)=)?('((?:$re_directive|[^'])*)'|"((?:$re_directive|[^"])*)"|(($re_directive|[^\s<>])+))/os;) {
my($key, $val, $val_orig, $rest)
--- 62,68 ----
my($s, $lc) = @_;
my %attr;
! $s = $1 if $s =~ /^<\S+(.*)\/\S$/s # XML-style self-closing tags
! || $s =~ /^<\S+(.*)\S$/s; # SGML-style tags
!
for (my $i = 0; $s =~ /^\s+(?:([a-zA-Z][-a-zA-Z0-9]*)=)?('((?:$re_directive|[^'])*)'|"((?:$re_directive|[^"])*)"|(($re_directive|[^\s<>])+))/os;) {
my($key, $val, $val_orig, $rest)
More information about the Koha-cvs
mailing list