velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roshan Ail" <R...@coremetrics.com>
Subject How do I make velocity preserve new lines in the output
Date Fri, 11 Jul 2008 21:28:44 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message