[Templates] A question on "trim"

Andy Wardley abw at wardley.org
Wed Jan 2 17:43:54 GMT 2008


Robert Hicks wrote:
> I had trim => 1 set as a global. Would that have caused this:

Hi Robert,

Nope, trim only trims the head/tail of each template you INCLUDE/PROCESS.
It doesn't have any effect on GET tags.

Just to make sure:

   [abw at shiny ~] tpage --trim
   [% webpage_title = 'Hello World' -%]
   <title>[% webpage_title %] </title>
   ^D
   <title>Hello World </title>

The only thing I can think of that affects anything outside of a tag
are the chomp options, but they only remove whitespace.  So there shouldn't
be anything in TT that makes that happen. If there is then it's a bug - but
it seems like a rather large and obvious one that should have been spotted
before now.

Have you got any other post-processing going on?  Or can you narrow the
problem down to a simple template/perl script that demonstrates the problem?

A






More information about the templates mailing list