Hi,

I'm trying to get multi-line directives to work in velocity.

Is see the following post from 2002:
   http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=7095

It looks like this feature never made it into velocity.

Why can't I do:

#set( $array =
   "foo",
   "bar",
   "blah" )

or

#set( $notSupported1 = "spanning multiple\
lines")

Is there an approved workaround?
The (ugly) workaround I've been using for now allows me to
break string constants accross multiple lines by embedding velocity
comments and backslashes into them.

Some examples of this:

#set( $sample1 = "the great spa##\
nner")    ## note that this line must start on the first column of the file!

or

#set( $sample2 = "I span #*\
  *#wide spaces")   ## note that the whitespace was in a comment

or
#set( $sample3 = "I span #*\
    in a comment here\
  *#wider spaces")


Thanks,
-Greg Wolfe

Reply via email to