--- test/html-webhacc/cc.cgi 2008/03/16 01:30:56 1.39 +++ test/html-webhacc/cc.cgi 2008/03/16 11:38:47 1.41 @@ -671,12 +671,12 @@

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"; } @@ -1121,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 { @@ -1456,4 +1463,4 @@ =cut -## $Date: 2008/03/16 01:30:56 $ +## $Date: 2008/03/16 11:38:47 $