[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: Re: VelociMacros and \n
From: "Nathan Bubna" <nathan () esha ! com>
Date: 2001-04-25 17:01:08
[Download RAW message or body]
this is untested, but it should work to go
#macro ( colorGet )
$_coltab.get($_colsel)#end
velocity tries very hard to maintain all whitespace.
> Hi,
>
> I want to use a velociMacro like this:
>
> #macro ( colorGet )
> $_coltab.get($_colsel)
> #end
>
> [...]
>
> <TR BGCOLOR="#colorGet()">
>
> [...]
>
>
> Unfortunately this gets translated to
>
> <TR BGCOLOR="#ffffff
> ">
>
> Note the \n before the closing ".
>
> I worked around like that:
>
> #macro ( colorGet )
> "$_coltab.get($_colsel)"
> #end
>
> [...]
>
> <TR BGCOLOR=#colorGet()>
>
> [...]
>
> which produces
>
> <TR BGCOLOR="#ffffff"
> >
>
> This is working but still ugly.
>
> Is there a way to get rid of the "\n" before the #end ?
>
> Regards
> Henning
>
>
>
> --
> Dipl.-Inf. (Univ.) Henning P. Schmiedehausen -- Geschaeftsfuehrer
> INTERMETA - Gesellschaft fuer Mehrwertdienste mbH hps@intermeta.de
>
> Am Schwabachgrund 22 Fon.: 09131 / 50654-0 info@intermeta.de
> D-91054 Buckenhof Fax.: 09131 / 50654-20
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic