Re: [Templates] plugins... data returned... newline?
[prev]
[thread]
[next]
[Date index for 2005/04/13]
Sean T Allen wrote:
> Need a quick explanation of something...
>
> we have a custom plugin that creates content so that...
>
> [% plugin.return_stuff(); -%]
>
> returns data for tt2 to output
>
> if dump the data to a tmp file before return_stuff actually returns the
> data...
>
> it is fine
>
> however, tt2 is adding an extra \n at the end
>
> so if we had
>
> [% plugin.return_stuff(); -%]
> AAA
>
> and retrun stuff should just return '111'
>
> we end up with
>
> 111
>
> AAA
>
> instead of
>
> 111
> AAA
>
> any ideas on where this extra newline is coming from and how i can
> prevent its addition greatly appreciated...
Hi Sean,
Is it possible your plugin is returning the newline? If it is, then:
[% plugin.return_stuff() | trim -%] should do the trick. If that's not the case then I suggest turning on template compilation, and then you can check out the compiled template to see if TT is actually adding the newline there.
-- Josh
_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates
 |
 |
Re: [Templates] plugins... data returned... newline?
Josh Rosenbaum 19:24 on 13 Apr 2005
|