--- loncom/xml/lontexconvert.pm 2003/03/13 16:16:07 1.20
+++ loncom/xml/lontexconvert.pm 2003/04/19 20:32:24 1.22
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# TeX Conversion Module
#
-# $Id: lontexconvert.pm,v 1.20 2003/03/13 16:16:07 www Exp $
+# $Id: lontexconvert.pm,v 1.22 2003/04/19 20:32:24 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -127,7 +127,8 @@ sub footer {
sub to_convert {
my ($string) = @_;
- $string=~s/\
/ /g;
+ $string=~s/\
/ /gs;
+ $string=~s/\s/ /gs;
$string=&HTML::Entities::decode($string);
return &converted(\$string);
}
@@ -142,7 +143,7 @@ sub smiley {
'\:\-*(o|O|\(\))' => 'shocked',
'\;\-*\)' => 'wink',
'\:\-*P' => 'baeh',
- '\:\-*(\\\|\\/)' => 'hrrm',
+ '\:\-(\\\|\\/)' => 'hrrm',
'\:\-*D' => 'bigsmile',
'\:\-*C' => 'angry',
'\:(\'|\`)\-*\(' => 'cry',
@@ -174,10 +175,10 @@ sub msgtexconverted {
&tth::tthoptions('-L -u0');
}
}
- $message=~s/(\$\$.+?\$\$)/&to_convert($1)/ge;
- $message=~s/(\$.+?\$)/&to_convert($1)/ge;
- $message=~s/(\\\(.+?\\\))/&to_convert($1)/ge;
- $message=~s/(\\\[.+?\\\])/&to_convert($1)/ge;
+ $message=~s/(\$\$.+?\$\$)/&to_convert($1)/gse;
+ $message=~s/(\$.+?\$)/&to_convert($1)/gse;
+ $message=~s/(\\\(.+?\\\))/&to_convert($1)/gse;
+ $message=~s/(\\\[.+?\\\])/&to_convert($1)/gse;
return &smiley($message).$errorstring;
}