/[texi2html]/texi2html/T2h_i18n.pm
ViewVC logotype

Diff of /texi2html/T2h_i18n.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by dprice, Tue Jul 12 14:59:01 2005 UTC revision 1.18 by pertusus, Tue Aug 23 06:58:03 2005 UTC
# Line 327  sub get_string($;$$) Line 327  sub get_string($;$$)
327          }          }
328      }      }
329      return main::substitute_line($string, $state) unless (defined($arguments) or !keys(%$arguments));      return main::substitute_line($string, $state) unless (defined($arguments) or !keys(%$arguments));
330        # if there are arguments, we must protect the %{arg} constructs before
331        # doing substitute_line. So there is a first pass here to change %{arg}
332        # to %@{arg@}
333      my $result = '';      my $result = '';
334      while ($string)      if (!$state->{'keep_texi'})
335      {      {
336          if ($string =~ s/^([^%]*)%//)          while ($string)
337          {          {
338              $result .= $1 if (defined($1));              if ($string =~ s/^([^%]*)%//)
             $result .= '%';  
             if ($string =~ s/^%//)  
             {  
                  $result .= '%';  
             }  
             elsif ($string =~ /^\{(\w+)\}/ and exists($arguments->{$1}))  
339              {              {
340                   $string =~ s/^\{(\w+)\}//;                  $result .= $1 if (defined($1));
341                   if (!$state->{'keep_texi'})                  $result .= '%';
342                   {                  if ($string =~ s/^%//)
343                        $result .= "\@\{$1\@\}";                  {
344                   }                       $result .= '%';
345                   else                  }
346                   {                  elsif ($string =~ /^\{(\w+)\}/ and exists($arguments->{$1}))
347                        $result .= "\{$1\}";                  {
348                   }                       $string =~ s/^\{(\w+)\}//;
349                         $result .= "\@\{$1\@\}";
350                    }
351                    else
352                    {
353                         $result .= '%';
354                    }
355                    next;
356              }              }
357              else              else
358              {              {  
359                   $result .= '%';                  $result .= $string;
360                    last;
361              }              }
             next;  
         }  
         else  
         {    
             $result .= $string;  
             last;  
362          }          }
363            $string = main::substitute_line($result, $state);
364      }      }
365      if (!$state->{'keep_texi'})      # now we substitute the arguments
     {  
          $string = main::substitute_line($result, $state);  
     }  
     else  
     {  
          $string = $result;  
     }  
366      $result = '';      $result = '';
367      while ($string)      while ($string)
368      {      {

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26