This is possible, but I'm not sure it's wise. The problem is a combination
of things: first, it's only possible to set options on a per-file basis.
That is, options cannot cascade to sub-templates or partials or anything
like that. Second, if we allow any options to be set on a per-template
basis, people will expect that all options can. While per-file options make
sense for auto-escaping, it doesn't for other important options like output
format.

That said, it might be nice to have a way of setting options that only have
to do with parsing (as this one does). If you can come up with a good syntax
that doesn't encourage people to use it for the wrong options but is still
extensible for future options we might want to add, I'd consider using it.

On Wed, Aug 5, 2009 at 1:34 PM, Christian Niles
<[email protected]>wrote:

>
> Hello,
>
> I'd like to be able to enable auto-escaping on a per-template basis --
> is this possible? I'm in the process of converting a set of templates,
> and it'd be nice to be able to convert them piecemeal, rather than all
> at once. I could see this being generally useful in other situations.
>
> A few workarounds I've thought of are to use the explicit syntax in
> all cases (&= and !=), or define a custom filter that creates a new
> Engine with auto-escaping enabled.
>
> thanks!
> christian.
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to