[Zope] Page Template parser
Dieter Maurer
dieter at handshake.de
Sun Sep 19 16:05:40 EDT 2004
Garito wrote at 2004-9-18 17:12 +0200:
> ...
><tal:b tal:define='global Message string:Hello, World!' />
><tal:b tal:replace='Message' />
>
>the response will be:
>\n
>Hello, World!
>
>I would like to know if is possible to delete \n automatically (or
>programmatically) understanding this \n like the parser response to
><tal:b tal:define ... />
If it is possible (in principle, it is), it will be very difficult because
it is not easy to distinquish "real" from artificial "\n".
I would not care about such estetics.
If you think, you have to care, you must write your
ZPT such that "\n" is not generated where you do not want one.
In your example above, you could for example use:
<tal:b tal:define='global Message string:Hello, World!'
/><tal:b tal:replace='Message' />
--
Dieter
More information about the Zope
mailing list