velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Heyl <...@pixelboxx.de>
Subject Re: unwanted whitespace
Date Tue, 07 Dec 2004 08:12:36 GMT
Rob Butler wrote:

>Hello all,
>
>I read the velocity docs, and according to them I can
>write the function below in two ways:
>
>Method 1:
> 
>#macro(displayPositiveOnly $val)
>	#if($val >= 0)
>		$val
>	#end
>#end
>
>Method 2:
>
>#macro(displayPositiveOnly $val)#if($val >=
>0)$val#end#end
>
>And either way the output will be the same.  I have
>tried both ways of defining the macro, and indeed both
>ways have the same output.  However, both ways also
>add about half a dozen extra spaces in front of $val,
>  
>
Perhaps you used something like
<bla>
   <pre>
        #displayPositiveOnly(4)
    </pre>
</bla>

I this case $val has 8 spaces in front of it ...

>which causes a problem.  Does Velocity have a bug in
>it's white space removal?  Am I doing something wrong?
>
>I am using Velocity version 1.4 that shipped with the
>SpringFramework 1.1.2.  $val is an integer.
>
>Thanks!
>Rob
>
>
>		
>__________________________________ 
>Do you Yahoo!? 
>The all-new My Yahoo! - What will yours do?
>http://my.yahoo.com 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>  
>


-- 
  Carsten Heyl				cal@pixelboxx.de
  Pixelboxx GmbH			http://www.pixelboxx.de/
  Ostenhellweg 56-58			Tel.:   +49 231 53 46 30
D-44135 Dortmund


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


Mime
View raw message