[Bio] / FigKernelPackages / HTML.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/HTML.pm

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

revision 1.26, Fri Dec 17 21:32:57 2004 UTC revision 1.27, Tue Dec 21 20:20:52 2004 UTC
# Line 326  Line 326 
326      my $border = defined $options{border} ? "border=\"$options{border}\"" : "border";      my $border = defined $options{border} ? "border=\"$options{border}\"" : "border";
327      push( @tab, "\n<table $border>\n",      push( @tab, "\n<table $border>\n",
328                  "\t<caption><b>$title</b></caption>\n",                  "\t<caption><b>$title</b></caption>\n",
329                  "\t<tr>\n\t\t<th>"                  "\t<tr>\n\t\t"
330                . join( "</th>\n\t\t<th>", @$col_hdrs )                . join( "\n", map { &expand($_, "th") } @$col_hdrs )
331                . "</th>\n\t</tr>\n"                . "\n\t</tr>\n"
332          );          );
333      my($i);      my($i);
334    
# Line 345  Line 345 
345  }  }
346    
347  sub expand {  sub expand {
348      my($x) = @_;      my($x, $tag) = @_;
349    
350        $tag = "td" unless $tag;
351    
352      if ($x =~ /^\@([^:]+)\:(.*)$/)      if ($x =~ /^\@([^:]+)\:(.*)$/)
353      {      {
354          return "\t\t<td $1>$2</td>";          return "\t\t<$tag $1>$2</$tag>";
355      }      }
356      else      else
357      {      {
358          return "\t\t<td>$x</td>";          return "\t\t<$tag>$x</$tag>";
359      }      }
360  }  }
361    

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3