Here's something I wrote for our team last year:
I was less informed about TT's behavior than I should have been, and another member of our team has confessed to me that he was even less informed than I was!
This is a brief explanation of how chomping works.
Suppose I have the following template, with the variable x = 'foo'
<td>
[% x %]
</td>
will become
<td>
foo
</td>
Note the spaces at the beginning of the second line.
TT has configuration settings for PRE_CHOMP and POST_CHOMP.
If PRE_CHOMP is 1, then all the whitespace in front of a directive, including a newline, is removed. The example becomes
<td>foo
</td>
If POST_CHOMP is 1, then the opposite occurs on the other end:
<td>
foo</td>
If PRE/POST_CHOMP is 2, then all preceding/succeeding whitespace is collapsed to a single space:
<td> foo </td>
If PRE/POST_CHOMP is 3, then all preceding/succeeding whitespace is eliminated:
<td>foo</td>
==IMPORTANT==
Bugzilla is configured with PRE_CHOMP = 1. POST_CHOMP is not set.
You can explicitly denote chomping behavior with one of the characters -, =, ~, and + after the '[%' or before the '%]'. '-' denotes CHOMP level 1, = denotes CHOMP level 2, ~ denotes CHOMP level 3, + denotes no chomping regardless of whether it is set in the overall configuration.
So to repeat the example:
<td>
[% x %]
</td>
Because we have PRE_CHOMP = 1, then this will become
<td>foo
</td>
<td>
[%- x -%]
<td>
becomes
<td>foo</td>
<td>
[%= x =%]
</td>
becomes <td> foo </td>
<td>
[%~ x ~%]
</td>
becomes <td>foo</td>
Finally,
<td>
[%+ x %]
</td>
becomes
<td>
foo
</td>
For an even more verbose explanation, do 'perldoc Template::Manual::Config' and search for CHOMP.