Reputation: 93
What is the difference between [% %]
and [%- -%]
in Template Toolkit?
Upvotes: 5
Views: 1487
Reputation: 98398
The -
automatically removes some whitespace from before/after the directive tag.
You can add
-
or+
to the immediate start or end of a directive tag to control the whitespace chomping options. See thePRE_CHOMP
andPOST_CHOMP
options for further details.
See Template::Manual::Config for good examples of the effects with and without pre and post chomping.
Upvotes: 10