Leading Space Escaping

10 views
Skip to first unread message

docyes

unread,
Jan 19, 2009, 3:47:19 PM1/19/09
to Mako Templates for Python
Anyone know of a leading space escaping technique?

If this is not currently available it would handy for large content
outputs where source code could follow human readible indenting
whereas http resposes are not bombarded with space character payload.

Thanks,
Carl

Michael Bayer

unread,
Jan 19, 2009, 4:06:17 PM1/19/09
to mako-d...@googlegroups.com
its something I'd eventually like to build in to Mako for certain use
cases, perhaps an extension of the "\" construct on the tail end.

For now there's no super easy way to escape leading space unless you
employ content filters which strip it out. Leading space is not an
issue for control lines, but for indented content within the control
lines it is.
Message has been deleted

Carl

unread,
Jan 26, 2009, 8:23:21 PM1/26/09
to mako-d...@googlegroups.com
That's pretty cool man.

On Mon, Jan 26, 2009 at 4:30 PM, Domen Kožar <iEle...@gmail.com> wrote:
>
> <%!
> import string
> %>
> <%def name="f()" filter="string.strip">
> fubar
> </%def>
Reply all
Reply to author
Forward
0 new messages