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

sakharuk lon-capa-cvs@mail.lon-capa.org
Tue, 13 Jul 2004 18:13:46 -0000


sakharuk		Tue Jul 13 14:13:46 2004 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  Underscore problem is fixed (escaped everywhere).
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.328 loncom/xml/lonxml.pm:1.329
--- loncom/xml/lonxml.pm:1.328	Mon Jul 12 12:25:51 2004
+++ loncom/xml/lonxml.pm	Tue Jul 13 14:13:46 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.328 2004/07/12 16:25:51 albertel Exp $
+# $Id: lonxml.pm,v 1.329 2004/07/13 18:13:46 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -389,9 +389,10 @@
     } else {
 	$string=~s/\\/\\ensuremath{\\backslash}/g;
 	$string=~s/([^\\]|^)\%/$1\\\%/g;
-	$string=~s/\b_{2,}\b/ \\makebox\[1 cm\]\[b\]{\\hrulefill}/g;
-	$string=~s/([^\\]|^)(\$|_)/$1\\$2/g;
+	$string=~s/([^\\]|^)\$/$1\\\$/g;
+	$string=~s/([^\\])\_/$1\\_/g;
 	$string=~s/\$\$/\$\\\$/g;
+	$string=~s/\_\_/\_\\\_/g;
 	$string=~s/\#\#/\#\\\#/g;
         $string=~s/([^\\]|^)(\~|\^)/$1\\$2\\strut /g;
 	$string=~s/(>|<)/\\ensuremath\{$1\}/g; #more or less