On 04/04/2012 14:03, Alex Zwinge wrote:
> The issue is that when the template is rendered and outputted to a
> file tt seems like it's adding a bunch of extra line breaks between
> the lines. So for example if in my template I have

These might help:

http://tt2.org/docs/manual/Config.html#section_PRE_CHOMP_POST_CHOMP
http://tt2.org/docs/manual/Syntax.html#section_Chomping_Whitespace

(on second thoughts, maybe not...)

> The content in question is static, not perl/tt code.

Ah right, it doesn't sound like the PRE_CHOMP/POST_CHOMP is the answer then. If the problem is happening with static text then it suggests a problem with your line endings. This appears to be the same problem:

http://mail.template-toolkit.org/pipermail/templates/2009-September/010927.html

There's a work-around posted there but it would be good to get to the root cause of the problem. It might be as simple as adding the BINMODE option.

    my $tt = Template->new( BINMODE => 1 );

That might be enough to coerce Perl into saving the correct line endings into the output file. Try that and see if it makes any difference.

Cheers
Andy

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

Reply via email to