[ZPT] mangled source

Jason Byron jason_zope@yahoo.com
Sat, 23 Jun 2001 15:03:54 -0700 (PDT)


> > > > Is there some way to keep zpt from adding newlines where
> there
> > > > were none before?
> > > > 
> > > > something like this:
> > > >         <td tal:content="here/blah/blah">text</td>
> > > > 
> > > > ends up like:
> > > >         <td 
> > > >     tal:content="here/blah/blah">text</td>
> > > > 
> > > > after it's saved.
> > > 
> > > Ah, the wrapping feature.  We do this because the HTML/XML
> parsers
> > > don't tell us where and what the whitespace in the source
> is.  To
> > > turn it off, edit TAL/TALInterpreter.py and change
> "wrap=60" to
> > > "wrap=0" in TALInterpreter.__init__()'s parameter list. 
> Then a
> > > tag will always be on one line, no matter how long it
> is...
> > 
> > That makes sense, but why does parsing need to change the
> source
> > when I simply save the template in Zope?  I can see the
> output
> > changing on rendering, but why when it's saved?  Sure, you
> > should parse the text for errors, but leave the original
> text as
> > it was and add an error message.  Or does the text need to
> be
> > parsed to be allowed to be saved?
> 
> It's supposed to be a feature that macros are (re-)expanded
> whenever
> you edit.  But you can turn it off: uncheck the "Expand macros
> when
> editing" checkbox on the right above the text edit box.
> 

ahhhh, I see.

I like the expansion idea for macros, but not the mangling of
what's inside the tags.  I'll have to look into changing that.
Seeing as how it hasn't been done already though, I'm sure it's
not going to be easy.

thanks


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/