Re: Output formatting

Jacob Smullyan <[email protected]>
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
Drew's response has most of the pertinent info; I'll just add that my
skunkweb "experimental branch", code-named "stoat", does support
suppression of whitespace around stml tags, using a special processing
instruction that is consumed directly by the lexer, so whether
whitespace is eaten or not can be toggled.  

Other templating systems have various tricks for dealing with this.
Template Toolkit enables you to add a character at the end of a tag
which indicates that the rest of the line should be chomped, for
instance.  I decided for stoat that a separate processing instruction
was more direct and involved less typing; 99% of the time you probably
want to consume whitespace around tags, and not have to decide on a
per-tag basis.

I had a patch at one time that made DTLexer always chomp, but I can't
find it at the moment.  It was about 4 lines long.  If I locate it,
I'll post it.

Cheers,

js

On Wed, Oct 27, 2004 at 03:11:41PM +0200, Peter Loje wrote:
> Hi,
> 
> I have looked at the html output skunkweb produces and saw at lot of empty 
> lines. The lines:
> 
> <:comment:>Normal comment<:/comment:>\n
> <:#:>Short form of normal Comment<:/#:>\n                                         
> <:* Super comment *:>\n
> <:* Long comment\n
>     spanning more\n
>     that one line *:>\n
> <:import random:>\n
> 
> would be replaced with 5 \n - one for each closing :> tag. Maybe it's correct 
> that tags are replaced with nothing but I would like :>\n to be replaced with 
> nothing. Would that be a simple change? If have looked at the files in 
> pylibs/DT but couldn't figure it out.
> 
> Additionally I've noticed that the use of cached components will leave a 
> comment in the output like <!-- cache expires:Wed Oct 27 19:54:08 2004-->. 
> Does this comment have a function or is it only informal?
> 
> You might think that I would like to disguise the fact I'm running skunkweb. 
> That's not the case. I just happen to like nicely formattet html.
> 
> I have only been playing with skunkweb for a few days but I really like what 
> I've seen so far. 
> 
> Regards
> Peter L.
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> Skunkweb-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/skunkweb-list
> 

-- 
Jacob Smullyan
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBf+t2uqamFyFXXLIRAlksAJwOkrBvHPhPMdMkHMKNCUV679JZSgCgrabd
HxjfCJZgTaes1x4R9sRyCUE=
=c46V
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.