[Templates] Chomp Directive?
Sean McAfee
eefacm@gmail.com
Thu, 22 Mar 2007 11:33:42 -0700
------=_Part_38985_4326790.1174588422835
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 3/22/07, Josh Rosenbaum <josh@infogears.com> wrote:
>
> It would be nice to have a tag to control the chomping method in TT
> similar to the
> TAGS directive. (ie: [% TAGS <! !> %])
>
> I'm thinking:
> [% PRE_CHOMP CHOMP_NONE %]
> [% POST_CHOMP CHOMP_ALL %]
>
> or maybe:
> [% CHOMP CHOMP_NONE CHOMP_ALL %]
> or:
> [% CHOMP NONE ALL %]
>
> Anyone have any thoughts on this? There have been a few times where I've
> wanted to override the standard behavior we have here.
Maybe make it a scoped block, with a corresponding END directive, to prevent
spooky action-at-a-distance?
Thinking more generally, maybe a directive to change a range of parser
attributes (ANYCASE, INTERPOLATE, etc) in a scoped fashion.
--Sean
------=_Part_38985_4326790.1174588422835
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
On 3/22/07, <b class="gmail_sendername">Josh Rosenbaum</b> <<a href="mailto:josh@infogears.com">josh@infogears.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
It would be nice to have a tag to control the chomping method in TT similar to the<br>TAGS directive. (ie: [% TAGS <! !> %])<br><br>I'm thinking:<br>[% PRE_CHOMP CHOMP_NONE %]<br>[% POST_CHOMP CHOMP_ALL %]<br><br>
or maybe:<br>[% CHOMP CHOMP_NONE CHOMP_ALL %]<br>or:<br>[% CHOMP NONE ALL %]<br><br>Anyone have any thoughts on this? There have been a few times where I've wanted to override the standard behavior we have here.</blockquote>
<div><br>
Maybe make it a scoped block, with a corresponding END directive, to prevent spooky action-at-a-distance?<br>
<br>
Thinking more generally, maybe a directive to change a range of parser attributes (ANYCASE, INTERPOLATE, etc) in a scoped fashion.<br>
<br>
<br>
--Sean<br>
</div></div>
------=_Part_38985_4326790.1174588422835--