koha-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.24,1.25


From: Ambrose Li
Subject: [Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.24,1.25
Date: Fri, 13 Feb 2004 23:49:41 -0800

Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22679

Modified Files:
        text-extract2.pl 
Log Message:
Fixed problem recognizing tags in the form of <foo ... bar=<!-- TMPL_VAR ... >>


Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** text-extract2.pl    14 Feb 2004 07:13:09 -0000      1.24
--- text-extract2.pl    14 Feb 2004 07:49:37 -0000      1.25
***************
*** 53,59 ****
     my($compat) = @_;
     my $etag = $compat? '>': '<>\/';
!    # See the file "subst.pl.test1" for how the following mess is derived
!    # Unfortunately, inserting $re_directive's has made this even messier
!    q{(<\/?(?:|(?:"(?:} . $re_directive . q{|[^"])*"|'(?:} . $re_directive . 
q{|[^'])*'|--(?:[^-]|-[^-])*--|(?:} . $re_directive . q{|[^-"'} . $etag . 
q{]|-[^-]))+))([} . $etag . q{])(.*)};
  }
  BEGIN {
--- 53,61 ----
     my($compat) = @_;
     my $etag = $compat? '>': '<>\/';
!    # This is no longer similar to the original regexp in subst.pl :-(
!    # Note that we don't want <> in compat mode; Mozilla knows about <
!    q{(<\/?(?:|(?:"(?:} . $re_directive . q{|[^"])*"|'(?:} . $re_directive . 
q{|[^'])*'|--(?:[^-]|-[^-])*--|(?:}
!    . $re_directive
!    . q{|(?!--)[^"'<>} . $etag . q{]))+))([} . $etag . q{])(.*)};
  }
  BEGIN {
***************
*** 98,102 ****
            || $s =~ /^<\S+(.*)\S$/s;   # SGML-style tags
  
!     for (my $i = 0; $s =~ 
/^\s+(?:([a-zA-Z][-a-zA-Z0-9]*)\s*=\s*)?('((?:$re_directive|[^'])*)'|"((?:$re_directive|[^"])*)"|(($re_directive|[^\s<>])+))/os;)
 {
        my($key, $val, $val_orig, $rest)
                = ($1, (defined $3? $3: defined $4? $4: $5), $2, $');
--- 100,104 ----
            || $s =~ /^<\S+(.*)\S$/s;   # SGML-style tags
  
!     for (my $i = 0; $s =~ 
/^\s+(?:([a-zA-Z][-a-zA-Z0-9]*)\s*=\s*)?('((?:$re_directive|[^'])*)'|"((?:$re_directive|[^"])*)"|((?:$re_directive|[^\s<>])+))/os;)
 {
        my($key, $val, $val_orig, $rest)
                = ($1, (defined $3? $3: defined $4? $4: $5), $2, $');




reply via email to

[Prev in Thread] Current Thread [Next in Thread]