You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (Jira)" <ji...@apache.org> on 2020/01/24 07:52:00 UTC

[jira] [Resolved] (VELOCITY-925) Macro calls without parenthesis now "eats" the following newline

     [ https://issues.apache.org/jira/browse/VELOCITY-925?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claude Brisson resolved VELOCITY-925.
-------------------------------------
    Fix Version/s: 2.2
         Assignee: Claude Brisson
       Resolution: Fixed

This is properly documented in the upgrade page (see "space gobbling"). Commit 1873088 fixes the behavior under the {{parser.space_gobbling=bc}} mode.


> Macro calls without parenthesis now "eats" the following newline
> ----------------------------------------------------------------
>
>                 Key: VELOCITY-925
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-925
>             Project: Velocity
>          Issue Type: Bug
>          Components: Engine
>    Affects Versions: 2.1
>            Reporter: Thomas Mortagne
>            Assignee: Claude Brisson
>            Priority: Major
>             Fix For: 2.2
>
>
> The behavior of macro calls without parenthesis changed in 2.x. I cannot find anything in the changelog about that but maybe I missed it.
> The following:
> {code}
> #macro(mymacro)value#end
> #mymacro
> {code}
> produces:
> * in Velocity 1.7: "value/n"
> * in Velocity 2.x: "value"
> but:
> {code}
> #macro(mymacro)value#end
> #mymacro()
> {code}
> produces in both Velocity versions "value" (eats the newline)
> Looks like omitting parenthesis in Velocity 1.7 was making the macro call "inline" while having them was eating the following newline like things like #set directive do.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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