Search code examples
syntaxbugzillatemplate-toolkit

Bugzilla templates: what's the difference between [% and [%+


Code in Bugzilla templates is usually delimited by [% and %]. But sometimes I see [%+ and [%-. Can someone explain the difference or point me at suitable documentation? Google has failed me on this occasion.

For example:

[%- event.value.subject FILTER html %]

or

[%+ END %]

Solution

  • [%- (or -%]) removes leading (trailing) whitespace; [%+ (or +%]) maintains it. See PRE_CHOMP, POST_CHOMP in the Template Toolkit Manual (Bugzilla templates use the Template Toolkit) for the gory details (including [= and [~ :)).