You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Will Glass-Husain (JIRA)" <ji...@apache.org> on 2005/09/19 00:28:54 UTC

[jira] Resolved: (VELOCITY-278) The whitespaces are not getting gobbled up by Velocity.

     [ http://issues.apache.org/jira/browse/VELOCITY-278?page=all ]
     
Will Glass-Husain resolved VELOCITY-278:
----------------------------------------

    Resolution: Invalid
     Assign To:     (was: Velocity-Dev List)

It's not terribly intuitive, but this is expected behavior.  The #end removes the newline immediately following (unless there is other text).  See the Wiki for a discussion of this and suggested alternatives.

> The whitespaces are not getting gobbled up by Velocity.
> -------------------------------------------------------
>
>          Key: VELOCITY-278
>          URL: http://issues.apache.org/jira/browse/VELOCITY-278
>      Project: Velocity
>         Type: Bug
>   Components: Testing
>     Versions: 1.0-Release
>  Environment: Operating System: other
> Platform: Other
>     Reporter: Narinder

>
> I am using velocity-1.4 on Fuedora Linux and is not ignoring the whitespaces.
> I am using the following code:
> First example:
> #foreach( $foo in [1..5] )
> $foo
> #end
> This prints out
> First example:
> 1
> 2
> 3
> 4
> 5
> If I change the template as:
> First example:
> #foreach( $foo in [1..5] )
> $foo #end
> The output comes as:
> First example:
> 1 2 3 4 5
> According to the User Guide, the output should be the same in both the cases.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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