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

sakharuk lon-capa-cvs@mail.lon-capa.org
Mon, 04 Aug 2003 14:30:34 -0000


sakharuk		Mon Aug  4 10:30:34 2003 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
   Bug 1188 (The % at the end doesn't show up) is fixed. I did this in a rather bad way but I am working with this (I have a few more situations with %) so I am going to return to this issue a little bit letter.  
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.266 loncom/xml/lonxml.pm:1.267
--- loncom/xml/lonxml.pm:1.266	Tue Jul  8 10:49:30 2003
+++ loncom/xml/lonxml.pm	Mon Aug  4 10:30:34 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.266 2003/07/08 14:49:30 bowersj2 Exp $
+# $Id: lonxml.pm,v 1.267 2003/08/04 14:30:34 sakharuk Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -492,6 +492,7 @@
 	$current_token=~s/(>|<)/\$$1\$/g; #more or less
 	if ($current_token=~m/\d%/) {$current_token =~ s/(\d)%/$1\\%/g;} #percent after digit
 	if ($current_token=~m/\s%/) {$current_token =~ s/(\s)%/$1\\%/g;} #persent after space
+	if ($current_token eq '%.') {$current_token = '\%.';} #persent at the end of statement
     }
     return $current_token;
 }
@@ -1049,7 +1050,7 @@
       my $val=$token->[2]->{$_};
       $val =~ s/([\%\@\\\"\'])/\\$1/g;
       #if ($val =~ m/^[\%\@]/) { $val="\\".$val; }
-      $temp .= "my \$$_=\"$val\";"
+      $temp .= "my \$$_=\"$val\";";
     }
   }
   return $temp;