--- test/html-webhacc/cc.cgi 2008/03/11 14:10:11 1.38 +++ test/html-webhacc/cc.cgi 2008/03/16 11:38:47 1.41 @@ -86,6 +86,8 @@
$char_length byte@{[$char_length == 1 ? '' : 's']}
+ + ]; $input->{id_prefix} = ''; @@ -292,7 +294,7 @@

Parse Errors

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

Parse Errors

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

Parse Errors

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

Parse Errors

-
]; +
]; push @nav, ['#parse-errors' => 'Parse Error'] unless $input->{nested}; my $onerror = sub { @@ -669,19 +671,20 @@

Document Source

    \n]; if (length $$s) { - while ($$s =~ /\G([^\x0A]*?)\x0D?\x0A/gc) { + while ($$s =~ /\G([^\x0D\x0A]*?)(?>\x0D\x0A?|\x0A)/gc) { print STDOUT qq[
  1. ], htescape $1, "
  2. \n"; $i++; } - if ($$s =~ /\G([^\x0A]+)/gc) { + if ($$s =~ /\G([^\x0D\x0A]+)/gc) { print STDOUT qq[
  3. ], htescape $1, "
  4. \n"; } } else { print STDOUT q[
  5. ]; } - print STDOUT "
"; + print STDOUT "
+"; } # print_input_string_section sub print_document_tree ($$) { @@ -1118,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 { @@ -1453,4 +1463,4 @@ =cut -## $Date: 2008/03/11 14:10:11 $ +## $Date: 2008/03/16 11:38:47 $