Re: Table cell border for null cells?

Hello Nick,

well, do you have Perl available?
I would use a small Perl script to post-process the Tidy output and fix 
things like your empty table cell problem.

a regular expression like the following should do the job:

# put a <BR> into empty table cells
$tidied_data =~ s/(<TD[^>]*?>)\s*(<\/TD[^>]*?>)/$1<BR>$2/gsi;

# replace &nbsp; with a <BR> in otherwise empty table cells
$tidied_data =~ s/(<TD[^>]*?>)\s*&nbsp;\s*(<\/TD[^>]*?>)/$1<BR>$2/gsi;

# do both at once and for table headers as well
$tidied_data =~ 
s/(<T[HD][^>]*?>)((\s*&nbsp;)?\s*)(<\/T[HD][^>]*?>)/$1<BR>$3/gsi;


Regarding the Editor, I have no better suggestion, sorry.



Have a nice day, Nick... we shouldn't be working on a holiday... ;-)


sebastian


At 14:59 01.05.2001 +0100, nick@brainstorm.co.uk wrote:
> > put a <BR> into the otherwise empty table cell and it will appear as you
> > wish (as long as you wish the cell to be at least one line high).
>
>Thanks Sebastian, I believe either a space or br will work.  My question
>however was was if there is a way for Tidy to strip out spaces?  Asking
>all Word users to manually break each cell of a very large table so
>there exists a <br> instead of a space is hardly an option.
>
> > >While I'm here - anyone know of a decent wysiwyg HTML editor for windows
> > >for the non-techies in our orgnaization?
> >
> > If you _must_ - use Macromedia's Dreamweaver...
>
>My fault - I should have said we need a free/open-source editor, not a
>commercial site manager.  Dreamweaver doesn't really cut it for
>site-management here - no support for CVS versioning or ssh/scp
>syncronization.
>
>nick

--
Cyperfection - agentur fuer neue medien GmbH

Sebastian Lange
Senior Development Engineer
mailto:lange@cyperfection.de
+49 6 21 58 71 04-22

Karl-Kraemer-Str. 4
D-67061 Ludwigshafen
fon: +49 6 21 58 71 04-0
fax: +49 6 21 58 71 04-90
http://www.cyperfection.de/

Anfahrt - http://www.cyperfection.de/Anfahrt/

Received on Tuesday, 1 May 2001 10:16:07 UTC