That's odd.  If i remember correctly, the only newlines gobbled should
be when a #set directive is on a line by itself or when any other
directive (#foreach, #end, etc) is both on a line by itself and has no
preceding whitespace.  So the example template you gave should have
plenty of new lines.

What version of Velocity are you using?  And are you doing any other
processing of the content?

On Fri, Jul 11, 2008 at 2:28 PM, Roshan Ail <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> I am using velocity to output a groovy script.
>
>
>
> My velocity template is something like this.
>
>
>
>
>
> #foreach $c in $a
>
>
>
> def ${c}function()
>
> {
>
>  ....
>
> }
>
>
>
> #end
>
>
>
>
>
> The output that gets generated puts everything into one line and groovy
> fails to evaluate it since it expects each function definition to start
> with a new line.
>
>
>
> Essentially this is how the output gets generated at present.
>
>
>
> def afunction() { ... }  def bfunction {...}
>
>
>
>
>
> Is there any way I can have velocity preserve my formatting when the
> output is generated ?
>
>
>
>
>
> Thanks,
>
>
>
>
>
>
>
> Roshan
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to