Changeset 12813
- Timestamp:
- 10/20/11 15:21:32 (19 months ago)
- File:
-
- 1 edited
-
trunk/core/lib/Foswiki/Render.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki/Render.pm
r12812 r12813 325 325 elsif ( $lines->[$i] =~ s/$TRMARK=(["'])(.*?)\1//i ) { 326 326 if ($2) { 327 # In head or foot 327 328 # In head or foot 328 329 if ($inFoot) { 329 #print STDERR "FOOT: $lines->[$i]\n"; 330 331 #print STDERR "FOOT: $lines->[$i]\n"; 330 332 $footLines++; 331 333 } 332 334 else { 333 #print STDERR "HEAD: $lines->[$i]\n"; 335 336 #print STDERR "HEAD: $lines->[$i]\n"; 334 337 $headLines++; 335 338 } 336 339 } 337 340 else { 338 # In body 339 #print STDERR "BODY: $lines->[$i]\n"; 341 342 # In body 343 #print STDERR "BODY: $lines->[$i]\n"; 340 344 $inFoot = 0; 341 345 $headLines = 0; … … 344 348 $i--; 345 349 } 346 $lines->[ $i++] = CGI::start_table(350 $lines->[ $i++ ] = CGI::start_table( 347 351 { 348 352 class => 'foswikiTable', … … 354 358 355 359 if ($headLines) { 356 splice( @$lines, $i++, 0, '<thead>' );360 splice( @$lines, $i++, 0, '<thead>' ); 357 361 splice( @$lines, $i + $headLines, 0, '</thead>' ); 358 $i += $headLines + 1;362 $i += $headLines + 1; 359 363 } 360 364 361 365 if ($footLines) { 362 # Extract the foot and stick it in the table after the head (if any) 363 # WRC says browsers prefer this 366 367 # Extract the foot and stick it in the table after the head (if any) 368 # WRC says browsers prefer this 364 369 my $firstFoot = scalar(@$lines) - $footLines; 365 370 my @foot = splice( @$lines, $firstFoot, $footLines ); 366 unshift(@foot, '<tfoot>');367 push( @foot, '</tfoot>' );368 splice( @$lines, $i, 0, @foot );369 $i += scalar(@foot);371 unshift( @foot, '<tfoot>' ); 372 push( @foot, '</tfoot>' ); 373 splice( @$lines, $i, 0, @foot ); 374 $i += scalar(@foot); 370 375 } 371 376 splice( @$lines, $i, 0, '<tbody>' ); … … 801 806 } 802 807 else { 803 $text = _escapeAutoLinks($text);808 $text = _escapeAutoLinks($text); 804 809 } 805 810 }
Note: See TracChangeset
for help on using the changeset viewer.
