Diff for /loncom/xml/lontexconvert.pm between versions 1.29 and 1.30

version 1.29, 2004/01/28 17:16:27 version 1.30, 2004/01/28 20:48:35
Line 68  sub init_tth { Line 68  sub init_tth {
     &tth::tthoptions('-L -u0 '.$options);      &tth::tthoptions('-L -u0 '.$options);
  }   }
     }      }
     &Apache::lonnet::logthis("caled and use $options");  
     &Apache::lonnet::logthis("caller ".join(':',caller(0)));  
   
 }  }
   
 sub header {  sub header {
Line 139  sub footer { Line 136  sub footer {
 sub to_convert {  sub to_convert {
     my ($string) = @_;      my ($string) = @_;
     $string=~s/\<br\s*\/?\>/ /gs;      $string=~s/\<br\s*\/?\>/ /gs;
     $string=~s/\s/ /gs;  #    $string=~s/\s/ /gs;
     $string=&HTML::Entities::decode($string);      $string=&HTML::Entities::decode($string);
     return &converted(\$string);      return &converted(\$string);
 }  }
Line 170  sub smiley { Line 167  sub smiley {
   
 sub msgtexconverted {  sub msgtexconverted {
     my $message=shift;      my $message=shift;
       my $email=shift;
     $errorstring='';      $errorstring='';
     &init_tth();      &init_tth();
     my $outmessage='';      my $outmessage='';
     my $tex=0;      my $tex=0;
     foreach (split(/(?:\&lt\;|\<)\/*m\s*(?:\&gt\;|\>)/i,$message)) {      foreach (split(/(?:\&lt\;|\<)\/*m\s*(?:\&gt\;|\>)/i,$message)) {
  if ($tex) {   if ($tex) {
     $outmessage.=&to_convert($_); $tex=0;      if ($email) {
    $outmessage.='</pre><tt>'.&to_convert($_).'</tt><pre>'; $tex=0;
       } else {
    $outmessage.=&to_convert($_); $tex=0;
       }
  } else {   } else {
             $outmessage.=&smiley($_); $tex=1;              $outmessage.=&smiley($_); $tex=1;
  }   }

Removed from v.1.29  
changed lines
  Added in v.1.30


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>