--- loncom/xml/run.pm 2005/11/15 20:50:26 1.54 +++ loncom/xml/run.pm 2006/02/20 23:52:20 1.57 @@ -1,6 +1,6 @@ package Apache::run; # -# $Id: run.pm,v 1.54 2005/11/15 20:50:26 albertel Exp $ +# $Id: run.pm,v 1.57 2006/02/20 23:52:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -50,6 +50,7 @@ while (!$_LONCAPA_INTERNAL_oldexpression my $__LC__prefix; my $__LC__result; while (1) { + if ($__LC__a =~ m-^&(theta|pi|rho)$-) { last; } { use strict; no strict "vars"; @@ -139,8 +140,10 @@ sub run { if ($innererror=~/line (\d+)/) { my $linenumber=$1; my @code=split("\n",$code); - $code[$linenumber-1]=''. - $code[$linenumber-1].''; + if ($linenumber < scalar(@code)) { + $code[$linenumber-1]=''. + $code[$linenumber-1].''; + } $code=join("\n",@code); } &Apache::lonxml::error($errormsg.$code.'');