[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Texi2html-cvs] Changes to texi2html/T2h_i18n.pm
From: |
Patrice Dumas |
Subject: |
[Texi2html-cvs] Changes to texi2html/T2h_i18n.pm |
Date: |
Tue, 23 Aug 2005 02:58:05 -0400 |
Index: texi2html/T2h_i18n.pm
diff -u texi2html/T2h_i18n.pm:1.17 texi2html/T2h_i18n.pm:1.18
--- texi2html/T2h_i18n.pm:1.17 Tue Jul 12 14:59:01 2005
+++ texi2html/T2h_i18n.pm Tue Aug 23 06:58:03 2005
@@ -327,49 +327,42 @@
}
}
return main::substitute_line($string, $state) unless (defined($arguments)
or !keys(%$arguments));
+ # if there are arguments, we must protect the %{arg} constructs before
+ # doing substitute_line. So there is a first pass here to change %{arg}
+ # to address@hidden@}
my $result = '';
- while ($string)
+ if (!$state->{'keep_texi'})
{
- if ($string =~ s/^([^%]*)%//)
+ while ($string)
{
- $result .= $1 if (defined($1));
- $result .= '%';
- if ($string =~ s/^%//)
+ if ($string =~ s/^([^%]*)%//)
{
- $result .= '%';
+ $result .= $1 if (defined($1));
+ $result .= '%';
+ if ($string =~ s/^%//)
+ {
+ $result .= '%';
+ }
+ elsif ($string =~ /^\{(\w+)\}/ and exists($arguments->{$1}))
+ {
+ $string =~ s/^\{(\w+)\}//;
+ $result .= "address@hidden@\}";
+ }
+ else
+ {
+ $result .= '%';
+ }
+ next;
}
- elsif ($string =~ /^\{(\w+)\}/ and exists($arguments->{$1}))
- {
- $string =~ s/^\{(\w+)\}//;
- if (!$state->{'keep_texi'})
- {
- $result .= "address@hidden@\}";
- }
- else
- {
- $result .= "\{$1\}";
- }
+ else
+ {
+ $result .= $string;
+ last;
}
- else
- {
- $result .= '%';
- }
- next;
- }
- else
- {
- $result .= $string;
- last;
}
+ $string = main::substitute_line($result, $state);
}
- if (!$state->{'keep_texi'})
- {
- $string = main::substitute_line($result, $state);
- }
- else
- {
- $string = $result;
- }
+ # now we substitute the arguments
$result = '';
while ($string)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Texi2html-cvs] Changes to texi2html/T2h_i18n.pm,
Patrice Dumas <=