Re: Output formatting

Drew Csillag <[email protected]>
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
--- Peter Loje <[email protected]> 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.

It's not impossible, just difficult.  You could probably alter the
lexer (in DT/DTLexer.py) to snarf in the \n also when reading in the
':>', which it currently doesn't do, and probably isn't hard (I don't
have the code right in front of me).  When STML was being invented,
this issue was discussed and at the time, I think we had a good
reason for it, though I cannot now remember.  One argument is (don't
know how good it is):  perhaps there are cases (like javascript or
certain XML or in a <PRE> block) where you want a <:val:> tag
followed immediately by a newline.  This particular case could be
worked around by adding a newline in the value that gets spewed out,
but the val-tag-formatting could hose you there (say it converts \n
to <BR>).  Mayhap it could be done in a mimetype dependant way, or a
global tag option to not snarf the newline when you don't want it to.
 I now think I remember why we didn't do it: it can be a thorny
issue, so we punted.

> 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?

It's only informal.  It can be turned off with the
componentCommentLevel (or something like that) configuration variable
in sw.conf.

> 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.

You're not the first person to ask about the whitespace issue or the
componentCommentLevel thing.

> I have only been playing with skunkweb for a few days but I really
> like what 
> I've seen so far. 

Cool, thanks!

Cheers,
Drew


		
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail 


-------------------------------------------------------
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
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.