--- loncom/xml/londefdef.pm 2005/10/18 21:46:19 1.290 +++ loncom/xml/londefdef.pm 2005/11/08 02:04:23 1.293 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Tags Default Definition Module # -# $Id: londefdef.pm,v 1.290 2005/10/18 21:46:19 albertel Exp $ +# $Id: londefdef.pm,v 1.293 2005/11/08 02:04:23 albertel Exp $ # # # Copyright Michigan State University Board of Trustees @@ -110,8 +110,8 @@ sub start_m { # detect simple math mode entry exits, and convert them # to use \ensuremath if ($currentstring=~/^\s*\$[^\$].*[^\$]\$\s*$/) { - $currentstring=~s/^\$//; - $currentstring=~s/\$$//; + $currentstring=~s/^(\s*)\$/$1/; + $currentstring=~s/\$(\s*)$/$1/; $currentstring='\ensuremath{'.$currentstring.'}'; } $Apache::lonxml::post_evaluate=0; @@ -3456,9 +3456,12 @@ sub end_legend { #-- tag (end tag forbidden) sub start_link { - my ($target,$token) = @_; + my ($target,$token,$tagstack,$parstack,$parser,$safeeval) = @_; my $currentstring = ''; if ($target eq 'web') { + my $href=&Apache::lonxml::get_param('href',$parstack,$safeeval, + undef,1); + &Apache::lonxml::extlink($href); $currentstring = $token->[4]; } return $currentstring;