You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Thomas Mortagne (Jira)" <ji...@apache.org> on 2020/01/23 14:21:00 UTC
[jira] [Created] (VELOCITY-925) Macro calls without parenthesis now
"eats" the following newline
Thomas Mortagne created VELOCITY-925:
----------------------------------------
Summary: 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
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