Diff for /loncom/interface/entities.pm between versions 1.10 and 1.12.2.1

version 1.10, 2008/04/29 10:15:58 version 1.12.2.1, 2008/12/11 14:03:14
Line 1 Line 1
 # The LearningOnline Network  # The LearningOnline Network
 # entity -> tex.  # entity -> tex.
 #  #
 #   # $Id$
 #  #
 # Copyright Michigan State University Board of Trustees  # Copyright Michigan State University Board of Trustees
 #  #
Line 932  my %entities = ( Line 932  my %entities = (
 my  %utf_table = (  my  %utf_table = (
     'THORN'  => 222,      'THORN'  => 222,
     'thorn'  => 254,      'thorn'  => 254,
     'eth'    => 240      'eth'    => 240,
       'hearts' => 9829
 );  );
   
 #   # 
Line 978  sub entity_to_latex { Line 979  sub entity_to_latex {
     # Try to look up the entity (text or numeric) in the hash:      # Try to look up the entity (text or numeric) in the hash:
   
   
   
     my $latex = $entities{"$entity"};      my $latex = $entities{"$entity"};
     if (defined $latex) {      if (defined $latex) {
  return $latex;   return $latex;
Line 1030  sub replace_entities { Line 1032  sub replace_entities {
  $latex = &entity_to_latex($entity);   $latex = &entity_to_latex($entity);
  substr($input, $start, $end-$start) = $latex;   substr($input, $start, $end-$start) = $latex;
     }      }
   
       # Hexadecimal entities:
   
       while ($input =~ /&\#x(\d|[a-f,A-f])+;/) {
    ($start) = @-;
    ($end)   = @+;
    $entity  = "0" . substr($input, $start+2, $end-$start-3); # 0xhexnumber
    $latex = &entity_to_latex(hex($entity));
    substr($input, $start, $end-$start) = $latex;
       }
   
   
     # Now the &text; entites;      # Now the &text; entites;
           
     while ($input =~/(&\w+;)/) {      while ($input =~/(&\w+;)/) {

Removed from v.1.10  
changed lines
  Added in v.1.12.2.1


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