[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 08 Nov 2005 02:04:24 -0000


albertel		Mon Nov  7 21:04:24 2005 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - BUG#4436
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.292 loncom/xml/londefdef.pm:1.293
--- loncom/xml/londefdef.pm:1.292	Thu Nov  3 16:58:11 2005
+++ loncom/xml/londefdef.pm	Mon Nov  7 21:04:23 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.292 2005/11/03 21:58:11 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 @@
 	# 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;