A few small refinements to the table building code.

This commit is contained in:
Fred Drake 2000-11-30 07:17:27 +00:00
parent c01f6e691b
commit e463f8e4cd
1 changed files with 10 additions and 7 deletions

View File

@ -1018,6 +1018,9 @@ sub fix_font{
elsif ($font eq 'member') { elsif ($font eq 'member') {
$font = 'tt class="member"'; $font = 'tt class="member"';
} }
elsif ($font eq 'class') {
$font = 'tt class="class"';
}
elsif ($font eq 'constant') { elsif ($font eq 'constant') {
$font = 'tt class="constant"'; $font = 'tt class="constant"';
} }
@ -1068,7 +1071,7 @@ sub get_table_col1_fonts{
$efont = "</$font>"; $efont = "</$font>";
$efont =~ s/ .*>/>/; $efont =~ s/ .*>/>/;
} }
return ($font, $sfont, $efont); return ($sfont, $efont);
} }
sub do_env_tableii{ sub do_env_tableii{
@ -1105,11 +1108,11 @@ sub do_cmd_lineii{
my $c1 = next_argument(); my $c1 = next_argument();
my $c2 = next_argument(); my $c2 = next_argument();
s/[\s\n]+//; s/[\s\n]+//;
my($font,$sfont,$efont) = get_table_col1_fonts(); my($sfont,$efont) = get_table_col1_fonts();
$c2 = '&nbsp;' if ($c2 eq ''); $c2 = '&nbsp;' if ($c2 eq '');
my($c1align,$c2align) = split('\|', $aligns); my($c1align,$c2align) = split('\|', $aligns);
my $padding = ''; my $padding = '';
if ($c1align =~ /align="right"/) { if ($c1align =~ /align="right"/ || $c1 eq '') {
$padding = '&nbsp;'; $padding = '&nbsp;';
} }
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
@ -1155,11 +1158,11 @@ sub do_cmd_lineiii{
my $c2 = next_argument(); my $c2 = next_argument();
my $c3 = next_argument(); my $c3 = next_argument();
s/[\s\n]+//; s/[\s\n]+//;
my($font,$sfont,$efont) = get_table_col1_fonts(); my($sfont,$efont) = get_table_col1_fonts();
$c3 = '&nbsp;' if ($c3 eq ''); $c3 = '&nbsp;' if ($c3 eq '');
my($c1align,$c2align,$c3align) = split('\|', $aligns); my($c1align,$c2align,$c3align) = split('\|', $aligns);
my $padding = ''; my $padding = '';
if ($c1align =~ /align="right"/) { if ($c1align =~ /align="right"/ || $c1 eq '') {
$padding = '&nbsp;'; $padding = '&nbsp;';
} }
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"
@ -1210,11 +1213,11 @@ sub do_cmd_lineiv{
my $c3 = next_argument(); my $c3 = next_argument();
my $c4 = next_argument(); my $c4 = next_argument();
s/[\s\n]+//; s/[\s\n]+//;
my($font,$sfont,$efont) = get_table_col1_fonts(); my($sfont,$efont) = get_table_col1_fonts();
$c4 = '&nbsp;' if ($c4 eq ''); $c4 = '&nbsp;' if ($c4 eq '');
my($c1align,$c2align,$c3align,$c4align) = split('\|', $aligns); my($c1align,$c2align,$c3align,$c4align) = split('\|', $aligns);
my $padding = ''; my $padding = '';
if ($c1align =~ /align="right"/) { if ($c1align =~ /align="right"/ || $c1 eq '') {
$padding = '&nbsp;'; $padding = '&nbsp;';
} }
return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n" return "\n <tr>$c1align$sfont$c1$efont$padding</td>\n"