From 412847fe93e2d931754339fa8c8be7a64e9fe5f4 Mon Sep 17 00:00:00 2001 From: acli Date: Fri, 13 Feb 2004 01:27:03 +0000 Subject: [PATCH] This way of reporting line numbers should make more sense, esp. for pathetic cases like search.marc/search.tmpl (missing closing " for an attribute) --- misc/translator/text-extract2.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/misc/translator/text-extract2.pl b/misc/translator/text-extract2.pl index 4b7858aa8a..babf17cc1e 100755 --- a/misc/translator/text-extract2.pl +++ b/misc/translator/text-extract2.pl @@ -80,13 +80,13 @@ sub extract_attributes ($;$) { $attr{+lc($key)} = [$key, $val, $val_orig, $i]; $s = $rest; warn "Warning: Attribute should be quoted" - . (defined $lc? " in line $lc": '') . ": $val_orig\n" + . (defined $lc? " near line $lc": '') . ": $val_orig\n" if $pedantic_p && $val =~ /[^-\.A-Za-z0-9]/s && $val_orig !~ /^['"]/; } if ($s =~ /\S/s) { # should never happen warn "Warning: Strange attribute syntax" - . (defined $lc? " in line $lc": '') . ": $s\n"; + . (defined $lc? " near line $lc": '') . ": $s\n"; } return \%attr; } @@ -111,7 +111,7 @@ sub next_token_internal (*) { # FIXME the following (the [<\s] part) is an unreliable HACK :-( } elsif ($readahead =~ /^(?:[^<]|<[<\s])+/s) { # non-space normal text ($kind, $it, $readahead) = (KIND_TEXT, $&, $'); - warn "Warning: Unescaped < in line $lc: $it\n" if $it =~ /[0] eq KIND_TAG) { # FIXME ($cdata_mode_p, $cdata_close) = (1, "") if $it->[1] =~ /^<(script|style|textarea)\b/i; #FIXME - push @$it, extract_attributes($it->[1], $lc); #FIXME + push @$it, extract_attributes($it->[1], $lc_0); #FIXME } } else { for (;;) { -- 2.39.2