[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.14,1.15
Ambrose Li
acli at users.sourceforge.net
Fri Feb 13 02:27:06 CET 2004
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31795
Modified Files:
text-extract2.pl
Log Message:
This way of reporting line numbers should make more sense,
esp. for pathetic cases like search.marc/search.tmpl
(missing closing " for an attribute)
Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** text-extract2.pl 13 Feb 2004 01:20:03 -0000 1.14
--- text-extract2.pl 13 Feb 2004 01:27:03 -0000 1.15
***************
*** 81,85 ****
$s = $rest;
warn "Warning: Attribute should be quoted"
! . (defined $lc? " in line $lc": '') . ": $val_orig\n"
if $pedantic_p
&& $val =~ /[^-\.A-Za-z0-9]/s && $val_orig !~ /^['"]/;
--- 81,85 ----
$s = $rest;
warn "Warning: Attribute should be quoted"
! . (defined $lc? " near line $lc": '') . ": $val_orig\n"
if $pedantic_p
&& $val =~ /[^-\.A-Za-z0-9]/s && $val_orig !~ /^['"]/;
***************
*** 87,91 ****
if ($s =~ /\S/s) { # should never happen
warn "Warning: Strange attribute syntax"
! . (defined $lc? " in line $lc": '') . ": $s\n";
}
return \%attr;
--- 87,91 ----
if ($s =~ /\S/s) { # should never happen
warn "Warning: Strange attribute syntax"
! . (defined $lc? " near line $lc": '') . ": $s\n";
}
return \%attr;
***************
*** 112,116 ****
} elsif ($readahead =~ /^(?:[^<]|<[<\s])+/s) { # non-space normal text
($kind, $it, $readahead) = (KIND_TEXT, $&, $');
! warn "Warning: Unescaped < in line $lc: $it\n" if $it =~ /</s;
} else { # tag/declaration/processing instruction
my $ok_p = 0;
--- 112,116 ----
} elsif ($readahead =~ /^(?:[^<]|<[<\s])+/s) { # non-space normal text
($kind, $it, $readahead) = (KIND_TEXT, $&, $');
! warn "Warning: Unescaped < near line $lc_0: $it\n" if $it =~ /</s;
} else { # tag/declaration/processing instruction
my $ok_p = 0;
***************
*** 156,160 ****
}
}
! warn "Warning: Unrecognizable token found in line $lc_0: $it\n"
if $kind eq KIND_UNKNOWN;
return defined $it? (wantarray? ($kind, $it):
--- 156,160 ----
}
}
! warn "Warning: Unrecognizable token found near line $lc_0: $it\n"
if $kind eq KIND_UNKNOWN;
return defined $it? (wantarray? ($kind, $it):
***************
*** 170,174 ****
($cdata_mode_p, $cdata_close) = (1, "</$1\\s*>")
if $it->[1] =~ /^<(script|style|textarea)\b/i; #FIXME
! push @$it, extract_attributes($it->[1], $lc); #FIXME
}
} else {
--- 170,174 ----
($cdata_mode_p, $cdata_close) = (1, "</$1\\s*>")
if $it->[1] =~ /^<(script|style|textarea)\b/i; #FIXME
! push @$it, extract_attributes($it->[1], $lc_0); #FIXME
}
} else {
More information about the Koha-cvs
mailing list