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

raeburn raeburn at source.lon-capa.org
Tue Dec 14 16:10:40 EST 2021


raeburn		Tue Dec 14 21:10:40 2021 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/xml	londefdef.pm 
  Log:
  - For 2.11
    Backport 1.466
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.456.2.5 loncom/xml/londefdef.pm:1.456.2.6
--- loncom/xml/londefdef.pm:1.456.2.5	Thu Sep 10 00:33:39 2020
+++ loncom/xml/londefdef.pm	Tue Dec 14 21:10:40 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.456.2.5 2020/09/10 00:33:39 raeburn Exp $
+# $Id: londefdef.pm,v 1.456.2.6 2021/12/14 21:10:40 raeburn Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -99,6 +99,18 @@
             # it will fail with tth. This is worth a warning.
             # (even though some people might just use latex for printing)
             &Apache::lonxml::warning(&mt('Missing $ in [_1].','<m>'));
+        } elsif (($env{'browser.type'} eq 'safari') && ($env{'form.editxmltext'}) &&
+                 (($env{'form.problemmode'} eq 'view') || ($env{'form.problemmode'} eq 'discard'))) {
+            my $delimiter;
+            if ($inside =~ /\$$/) {
+                $delimiter = '$';
+            } elsif ($inside =~ /\\([)\]])$/) {
+                $delimiter = $1;
+            }
+            if ($delimiter) {
+                &Apache::lonxml::warning(&mt('Insert a space between [_1] and [_2].',
+                                             $delimiter,'</m>'));
+            }
         }
 	my $eval=&Apache::lonxml::get_param('eval',$parstack,$safeeval);
 	if ($eval eq 'on') {




More information about the LON-CAPA-cvs mailing list