I've just learned that with apache velocity the directives add to the whitespace as well.
So for example:
#foreach ($record in $rows)
#foreach($value in $record)
$value
#end
#end
With something like this I end up getting extra lines for the #foreach
statements, the #end
statements, etc.
This isn't what I want, so I found I could block comment at the end of the lines like so:
#foreach ($record in $rows)#*
*##foreach($value in $record)#*
*#$value #*
*##end
#end
But this is pretty ugly to read. Is there any way to tell the velocity engine to not format my directives?
Maybe I'm doing something else wrong?
Thanks.