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

raeburn raeburn at source.lon-capa.org
Sun Sep 5 11:04:25 EDT 2021


raeburn		Sun Sep  5 15:04:25 2021 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  - Bug 6954
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.465 loncom/xml/londefdef.pm:1.466
--- loncom/xml/londefdef.pm:1.465	Thu Sep 10 00:28:48 2020
+++ loncom/xml/londefdef.pm	Sun Sep  5 15:04:25 2021
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.465 2020/09/10 00:28:48 raeburn Exp $
+# $Id: londefdef.pm,v 1.466 2021/09/05 15:04:25 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