You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Mike Kienenberger <mk...@alaska.net> on 2003/12/23 16:05:49 UTC

Re: Change to allow newlines in directives and + as a string concatenator

Geir Magnusson Jr <ge...@4quarters.com> wrote:
> I committed two changes that I think need community review. (Well, the 
> second does).
> 
> The first is that you can use newlines in directives
> 
> #foreach($foo
> in
> $bar)
> 
> or
> 
> #macro(
>           foo
>           $a
>           $b
>       )
> 
> etc.
> 
> The second, which I think we should agree on, is to use '+' as the 
> string concatenation operator, so you can :
> 
> #set($longstring = "this is a long "
>         + "string that you can do over "
>         + "multiple lines")

Anything that makes Velocity less fragile and more intuitive is a Good Thing 
in my opinion.
Both of these do that.

(I had a 20-argument macro all crammed on one line just earlier this week 
that really could have benefitted from newlines.)

-Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org