escape newline filter?

238 views
Skip to first unread message

Jonathan Vanasco

unread,
Dec 3, 2016, 1:17:56 PM12/3/16
to Mako Templates for Python
anyone know if it's possible to escape a newline filter (http://docs.makotemplates.org/en/latest/syntax.html#newline-filters)

I'm just adding a "space" for now, but can't seem to figure out any escape combo.

mike bayer

unread,
Dec 7, 2016, 10:35:38 AM12/7/16
to mako-d...@googlegroups.com
you mean to render a backslash? i would have thought "\\" does it, but
if not there's always ${"\\"} ...
> --
> You received this message because you are subscribed to the Google
> Groups "Mako Templates for Python" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mako-discuss...@googlegroups.com
> <mailto:mako-discuss...@googlegroups.com>.
> To post to this group, send email to mako-d...@googlegroups.com
> <mailto:mako-d...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/mako-discuss.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Vanasco

unread,
Dec 7, 2016, 9:46:24 PM12/7/16
to Mako Templates for Python


On Wednesday, December 7, 2016 at 10:35:38 AM UTC-5, mike bayer wrote:
you mean to render a backslash?  i would have thought "\\" does it, but
if not there's always ${"\\"} ...  

Sort of. I mean to render a combination of a backlash with newline.  "\\" will render a backslash, the but the filtering will consumer the newline.  The only options are using a space "\ " or a variable ${"\\"}

I'll stick with a space for now, as it's more legible (this is for some ascii art in an html header)

Reply all
Reply to author
Forward
0 new messages