[Templates] getting rid of auto ident

Josh Rosenbaum josh@infogears.com
Fri, 17 Nov 2006 14:39:27 -0700


Fagyal Csongor wrote:
[SNIP]
> I have just tried this (similar problem):
> 
> [% SET a = "
> adsf
> adsf
> "
> %]
> 
> Gives me:
> 
>     $stash->set('a', '
>     adsf
>     adsf
>     ');
>     $output .=  "\n\n";
> 
> Once again the whitespaces...


Try:
[% a = BLOCK %]
adsf
adsf

[% END %]

I'm not sure about shutting off auto-indent. Maybe you can modify/subclass the Template::Document::as_perl routine to help you out there? (I just glanced at the code, so that could be the wrong spot.)

-- Josh