It also looks like changing PRE_CHOMP and POST_CHOMP to "2" will do what you want. "1" just works on space adjacent to a newline.
On Tue, Oct 27, 2009 at 8:35 PM, Rick <wrink...@gmail.com> wrote: > TT will only act on text that is included or within a TT block. Your spaces > are outside of TT's context. You can simply wrap your text with a filter: > > [% FILTER collapse %] > > Peoples of [%- planet -%] , your > attention pls. > > This is [% captain %] of the galestic Hyper Space Planning > > [%- "Council" -%]. > [% END %] > > > On Tue, Oct 27, 2009 at 6:28 PM, Rajesh Saha <rajeshsaha...@gmail.com>wrote: > >> Sorry, attachment was missing on earlier mail. >> >> Here it's. >> >> Regards, >> Rajesh >> >> >> >> On Wed, Oct 28, 2009 at 6:57 AM, Rajesh Saha <rajeshsaha...@gmail.com>wrote: >> >>> Hello, >>> >>> PFA one testcase, includes one .pl file & the other one- template. >>> >>> Here, my problem is that I can't remove the white spaces around "Jupiter" >>> with [%- -%] tag. Additionally, I want "Council" should be printed on the >>> same line of "Hyper Space Planning". >>> >>> Perl version: 5.8.8 >>> Template version: 2.20 >>> >>> BR, >>> Rajesh >>> >>> >>> On Tue, Oct 27, 2009 at 7:47 PM, Dave Cross <d...@dave.org.uk> wrote: >>> >>>> 2009/10/27 Rajesh Saha <rajeshsaha...@gmail.com>: >>>> > Hi, >>>> > >>>> > Actually, in my output, I am getting some spaces, which I didn't >>>> wanted to >>>> > be. At the same time, I could not figure out, from where it is coming. >>>> So, >>>> > as a work-around, I wanted something "backspace" so that I can >>>> eliminate >>>> > that spaces. >>>> > >>>> > I have tried [%- something -%] also, but still the same o/p. >>>> >>>> TT never inserts whitespace. Any whitespace in your output is there in >>>> your input (probably disguised by the presence of [% ... %] >>>> directives). >>>> >>>> The judicious use of [%- and -%] can usually remove any unwanted >>>> whitespace. >>>> >>>> Can you send a (simple!) example that demonstrates your problem? >>>> >>>> Dave... >>>> >>>> _______________________________________________ >>>> templates mailing list >>>> templates@template-toolkit.org >>>> http://mail.template-toolkit.org/mailman/listinfo/templates >>>> >>> >>> >> >> _______________________________________________ >> templates mailing list >> templates@template-toolkit.org >> http://mail.template-toolkit.org/mailman/listinfo/templates >> >> >
_______________________________________________ templates mailing list templates@template-toolkit.org http://mail.template-toolkit.org/mailman/listinfo/templates