--- test/html-webhacc/cc.cgi 2008/02/24 02:17:51 1.37 +++ test/html-webhacc/cc.cgi 2008/03/16 07:08:34 1.40 @@ -86,6 +86,8 @@
$char_length byte@{[$char_length == 1 ? '' : 's']}
+ + ]; $input->{id_prefix} = ''; @@ -292,18 +294,14 @@

Parse Errors

-
]; +
]; push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; my $onerror = sub { my (%opt) = @_; my ($type, $cls, $msg) = get_text ($opt{type}, $opt{level}); - if ($opt{column} > 0) { - print STDOUT qq[
Line $opt{line} column $opt{column}
\n]; - } else { - $opt{line} = $opt{line} - 1 || 1; - print STDOUT qq[
Line $opt{line}
\n]; - } + print STDOUT qq[
], get_error_label ($input, \%opt), + qq[
]; $type =~ tr/ /-/; $type =~ s/\|/%7C/g; $msg .= qq[ [Description]]; @@ -350,7 +348,7 @@

Parse Errors

-
]; +
]; push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{prefix}; my $onerror = sub { @@ -561,7 +559,7 @@

Parse Errors

-
]; +
]; push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; my $p = get_css_parser (); @@ -627,7 +625,7 @@

Parse Errors

-
]; +
]; push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; my $onerror = sub { @@ -685,7 +683,8 @@ } else { print STDOUT q[
  • ]; } - print STDOUT "
    "; + print STDOUT "
    +"; } # print_input_string_section sub print_document_tree ($$) { @@ -1122,7 +1121,14 @@ my $r = ''; - if (defined $err->{line}) { + if (defined $err->{token} and defined $err->{token}->{line}) { + if ($err->{token}->{column} > 0) { + $r = qq[Line $err->{token}->{line} column $err->{token}->{column}]; + } else { + $err->{token}->{line} = $err->{token}->{line} - 1 || 1; + $r = qq[Line $err->{token}->{line}]; + } + } elsif (defined $err->{line}) { if ($err->{column} > 0) { $r = qq[Line $err->{line} column $err->{column}]; } else { @@ -1457,4 +1463,4 @@ =cut -## $Date: 2008/02/24 02:17:51 $ +## $Date: 2008/03/16 07:08:34 $