[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 21 May 2004 21:07:54 -0000
matthew Fri May 21 17:07:54 2004 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
Throw away unhandled tags in tex output, just like web browsers do with
bogus html tags.
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.317 loncom/xml/lonxml.pm:1.318
--- loncom/xml/lonxml.pm:1.317 Thu Apr 15 16:18:46 2004
+++ loncom/xml/lonxml.pm Fri May 21 17:07:54 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.317 2004/04/15 20:18:46 albertel Exp $
+# $Id: lonxml.pm,v 1.318 2004/05/21 21:07:54 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -524,6 +524,10 @@
return $finaloutput;
}
+##
+## Looks to see if there is a subroutine defined for this tag. If so, call it,
+## otherwise do not call it as we do not know what it is.
+##
sub callsub {
my ($sub,$target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_;
my $currentstring='';
@@ -556,6 +560,10 @@
$parstack,$parser,$safeeval,
$style);
} else {
+ if ($target eq 'tex') {
+ # throw away tag name
+ return '';
+ }
#&Apache::lonxml::debug("NOT Calling sub $sub in $space $metamode");
if ($metamode <1) {
if (defined($token->[4]) && ($metamode < 1)) {