Here is a small change proposal. How about having Twiki render any table borders, even if the cell is empty.
Background:
At my work, I have a number of users who use tables a lot, but the tables start out empty for the most part. They like the borders to show, so they wind up entering “nbsp's” in every empty cell.
While the non-breaking-spaces solve the problem, I think it is cumbersome way to go about it.
Twiki::emitTR says:
sub emitTR {
my ( $pre, $cells, $insideTABLE ) = @_;
if( $insideTABLE ) {
$cells = "$pre TR TD $cells";
} else {
$cells = "$pre TABLE border=\"1\" TR TD $cells";
}
$cells =~ s@\|\s*$@ /TD /TR @go;
$cells =~ s@\|@ TD TD @go;
return $cells;
}
(removed tags for code display)
My understanding is that entering into the function, we need to replace $pre with an “nbsp” if $pre is empty. The most difficult part for me is in the last two lines before the return. Recursive substitution?? Anyone out there knows what to do here?
--
AlbertoBaez - 12 Jul 2001
This is in the latest
TWikiAlphaRelease:
| Cell to the right has a dot |
. |
| Cell to the right has : |
|
| Cell to the right has no space |
| Cell to the right has one space |
|
| Cell to the right has two spaces |
|
| Cell to the right has three spaces |
|
--
PeterThoeny - 15 Jul 2001