Re: [htmltmpl] Whitespace (linefeed) suppression?
Brought to you by:
samtregar
From: Puneet K. <pk...@ei...> - 2004-05-11 21:36:31
|
Mark Fuller wrote: > From: "Puneet Kishor" <pk...@ei...> > >> IMO, logic should belong in the >>script, not in the H-T markup, else it will become like php or >>coldfusion. The control tags (tmpl_if, tmpl_unless, etc.) provide basic >>programmatic control in the markup, but enough is enough, in my view. > > > It seems like the problem (not a problem, but shortcoming?) is that the use > of H::T tags leave residue linefeeds. The tags are removed, but not the > linefeeds which were used *only* to enhance the legibility of why the tags > were used. that's the beauty. H-T removes just what it is concerned with... it uses tags, so it removes tags. It doesn't use whitespace, so it leaves it alone. don't get me wrong -- I do see the point of a whitespace remover as it would make something (in this case, the html source) nicer to look at. I am not sure if H-T is the place to do it. Besides, only Sam will be able to tell how complicated it will be to program H-T to figure out which whitespace to keep and which to remove. This kind of complexity usually comes with a price. As I have said in the past, I usually can think of ways something can be improved... but H-T is just one of those darn programs that I find can't be improved. It is close to perfect. It has a handful of commands, and I know most of them... beautiful. So leave it be. The thing is... it is so easy to get around this problem... as David suggested... what is wrong with either html-tidy, or with s/\n\n/\n/g |