[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm
foxr
lon-capa-cvs@mail.lon-capa.org
Mon, 25 Sep 2006 10:11:49 -0000
foxr Mon Sep 25 06:11:49 2006 EDT
Modified files:
/loncom/xml londefdef.pm
Log:
Defect 4078 - Honor line break in simple <sup></sup> Note that
more complex stuff like <sup><othertag>text <br /></othertag</sup> will,
I think fail to honor the <br /> since it looks like the original
code is only looking for one level out... and to do this really properly
will involve closing all the enclosing tags, inserting the linebreak
and then reopening all the enclosing tags.
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.337 loncom/xml/londefdef.pm:1.338
--- loncom/xml/londefdef.pm:1.337 Tue Sep 19 06:57:11 2006
+++ loncom/xml/londefdef.pm Mon Sep 25 06:11:47 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Tags Default Definition Module
#
-# $Id: londefdef.pm,v 1.337 2006/09/19 10:57:11 foxr Exp $
+# $Id: londefdef.pm,v 1.338 2006/09/25 10:11:47 foxr Exp $
#
#
# Copyright Michigan State University Board of Trustees
@@ -1228,6 +1228,8 @@
$currentstring .= ' \vskip 0 mm ';
} elsif ($$tagstack[-2] ne 'sub' && $$tagstack[-2] ne 'sup') {
$currentstring .= '\strut \\\\ \strut ';
+ } else { # Honor break in simple <sup></sup>
+ $currentstring .= '}} \strut \\\\ \strut \ensuremath{^{';
}
}
return $currentstring;