Hi,

> [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 %]
Well... I have found some workarounds, too, but I am looking for *the*
solution :)

> 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.)
Thanks for the pointer, but that's not it.

as_perl has:
    BLOCK => $block,

So it's $block that contains the paddings.

I have found that Directive.pm contains all these lines for the different
directives:
...
return "$OUTPUT \$context->insert($file);";
...
return "$OUTPUT " . &text($class, $text) . ';';
...
etc...
...

Where $OUTPUT is:
$OUTPUT    = '$output .= ';

But I don't really know how TT works, so I cannot find what "concatenates"
these individual $OUTPUT lines :(

- Fagzal



_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to